perf: 优化自动编队逻辑 #4
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: Build Test for docs | |
on: | |
push: | |
branches-ignore: | |
- "master" | |
paths: | |
- "docs/**" | |
pull_request: | |
branches: | |
- "dev" | |
paths: | |
- "docs/**" | |
workflow_dispatch: | |
jobs: | |
build-test: | |
timeout-minutes: 20 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
show-progress: false | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Install dependencies | |
run: npm i | |
working-directory: "./docs" | |
- name: Cleanup files | |
run: rm tsconfig.json | |
working-directory: "./docs" | |
- name: Build | |
run: npm run build | |
working-directory: "./docs" | |
- name: Upload artifact to GitHub | |
uses: actions/upload-artifact@v4 | |
with: | |
name: docs | |
path: "./docs/.vuepress/dist" |