Skip to content

Merge pull request #705 from tetov/dependabot/npm_and_yarn/typescript… #968

Merge pull request #705 from tetov/dependabot/npm_and_yarn/typescript…

Merge pull request #705 from tetov/dependabot/npm_and_yarn/typescript… #968

Workflow file for this run

name: pre-commit
on:
push:
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- name: Set up node
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
- name: Update npm
run: npm install -g npm@latest
- name: Get npm cache directory
id: npm-cache-dir
run: |
echo "npm_cache_dir=$(npm config get cache)" >> $GITHUB_ENV
- name: Restore NPM cache
uses: actions/cache@v3
id: npm-cache # use this to check for `cache-hit` ==> if: steps.npm-cache.outputs.cache-hit != 'true'
with:
path: ${{ env.npm_cache_dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Restore Gatsby cache
uses: actions/cache@v3
id: gatsby-cache
with:
path: |
./.cache
./public
key: ${{ runner.os }}-gatsby-${{ github.sha }}
restore-keys: |
${{ runner.os }}-gatsby-
- name: Install
run: npm ci
- name: Build
run: npm run build
- uses: pre-commit/action@v3.0.0