docs: Update documents #18
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 ] | |
# docs内容变动才会触发action | |
paths: | |
- 'docs/**' | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
cache: 'pnpm' | |
node-version: 18 | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build docs | |
run: pnpm docs:build | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GH_RELEASE_TOKEN }} | |
publish_dir: ./docs/.vitepress/dist |