chore(deps-dev): bump husky from 8.0.3 to 9.1.7 #3090
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
name: Node.js CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Cache Node Modules | |
id: cache-node-modules | |
uses: actions/cache@v4 | |
with: | |
path: node_modules | |
key: node-modules-${{ hashFiles('package-lock.json') }} | |
- name: Install dependencies | |
if: steps.cache-node-modules.outputs.cache-hit != 'true' | |
run: npm ci | |
- name: Lint code | |
run: npm run lint | |
- name: Build swagger-adjust | |
run: npm run build | |
- name: Cache demo Node Modules | |
id: cache-node-modules-demo | |
uses: actions/cache@v4 | |
with: | |
path: demo/node_modules | |
key: node-modules-demo${{ hashFiles('demo/package-lock.json') }} | |
- name: Install demo dependencies | |
if: steps.cache-node-modules-demo.outputs.cache-hit != 'true' | |
run: npm ci | |
working-directory: ./demo | |
- name: Build demo | |
run: npm run build | |
working-directory: ./demo | |
- name: Upload build artifacts | |
if: github.ref == 'refs/heads/main' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build | |
path: ./demo/build | |
deploy: | |
name: Deploy demo | |
if: github.ref == 'refs/heads/main' | |
needs: [ build ] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download math result for job 1 | |
uses: actions/download-artifact@v4 | |
- name: Deploy 🚀 | |
uses: JamesIves/[email protected] | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
branch: gh-pages # The branch the action should deploy to. | |
folder: build # The folder the action should deploy. | |
clean: true # Automatically remove deleted files from the deploy branch |