chore: 更新 package-lock.json 文件 #3
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
name: Deploy Docs | |
on: | |
push: | |
branches: [ main ] | |
workflow_dispatch: | |
inputs: | |
message: | |
description: 'Test scenario tags' | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
node-version: [ 18 ] | |
steps: | |
- name: Cancel Previous Runs | |
uses: styfle/cancel-workflow-action@0.12.1 | |
with: | |
access_token: ${{ github.token }} | |
- name: Git checkout | |
uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Cache node modules | |
uses: actions/cache@v4 | |
with: | |
path: | | |
**/node_modules | |
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-modules | |
- name: Install Dependencies | |
run: | | |
npm install | |
- name: Build | |
run: | | |
npm run build | |
- name: Deploy | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
folder: build | |
branch: gh-pages | |
clean: true |