diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 57300c64..9b5f2348 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -38,21 +38,6 @@ jobs: - name: Build VuePress site run: pnpm docs:build - # 查看 workflow 的文档来获取更多信息 - # @see https://github.com/crazy-max/ghaction-github-pages - - name: Deploy to GitHub Pages - uses: crazy-max/ghaction-github-pages@v2 - with: - # 部署到 gh-pages 分支 - target_branch: gh-pages - #保留历史 - keep_history: false - # 部署目录为 VuePress 的默认输出目录 - build_dir: docs/.vuepress/dist - env: - # @see https://docs.github.com/cn/actions/reference/authentication-in-a-workflow#about-the-github_token-secret - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Push to NiaServer-Docs-CN run: | git config --global user.name 'GitHub Actions' @@ -67,3 +52,19 @@ jobs: git push --force "https://${{ secrets.PUSH_REPO_TOKEN }}@github.com/Nia-Server/NiaServer-Docs-CN.git" gh-pages env: GITHUB_TOKEN: ${{ secrets.PUSH_REPO_TOKEN }} + + # 查看 workflow 的文档来获取更多信息 + # @see https://github.com/crazy-max/ghaction-github-pages + - name: Deploy to GitHub Pages + uses: crazy-max/ghaction-github-pages@v2 + with: + # 域名设置为docs.mcnia.com + fqdn: docs.mcnia.com + # 部署到 gh-pages 分支 + target_branch: gh-pages + #保留历史 + keep_history: false + # 部署目录为 VuePress 的默认输出目录 + build_dir: docs/.vuepress/dist + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}