## 参考资料:https://v2.vuepress.vuejs.org/zh/guide/deployment.html#github-pages name: Github-Page-Deploy on: push: branches: - master - next workflow_dispatch: jobs: deploy-github: name: "部署到Github" runs-on: ubuntu-latest steps: - name: checkout code uses: actions/checkout@v3 with: # “最近更新时间” 等 git 日志相关信息,需要拉取全部提交记录 fetch-depth: 0 - name: Install Node.js uses: actions/setup-node@v3 with: node-version: 16.20.2 - name: PNPM Install uses: pnpm/action-setup@v2 with: version: 7 run_install: true # 运行构建脚本 - name: Build VuePress Site run: ./scripts/bundle build_proxy - name: Deploy to GitHub Page uses: crazy-max/ghaction-github-pages@v3 with: target_branch: pages/github build_dir: docs/.vuepress/dist env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}