diff options
author | Casey Rodarmor <casey@rodarmor.com> | 2024-01-25 17:36:13 -0800 |
---|---|---|
committer | Casey Rodarmor <casey@rodarmor.com> | 2024-01-25 17:36:13 -0800 |
commit | 45638905e4125e6e19d82f5c47d5483d585c09ae (patch) | |
tree | e5cbb48305535541cc9d5551607ec2ed658a1975 | |
parent | d1e2ef788f054dd15ad97087247e2481e725c286 (diff) |
Use GitHub official actions to deploy pages
-rw-r--r-- | .github/workflows/ci.yaml | 33 |
1 files changed, 27 insertions, 6 deletions
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 81f53021..3adfb2b7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -73,13 +73,34 @@ jobs: mdbook build book/en mdbook build book/zh - - name: Deploy Pages - uses: peaceiris/actions-gh-pages@v3 - if: github.ref == 'refs/heads/master' + - name: Configure Pages + # if: github.ref == 'refs/heads/main' + uses: actions/configure-pages@v3 + + - name: Upload Pages Artifact + # if: github.ref == 'refs/heads/main' + uses: actions/upload-pages-artifact@v1 with: - github_token: ${{secrets.GITHUB_TOKEN}} - publish_branch: gh-pages - publish_dir: www + path: www + + deploy-pages: + # if: github.ref == 'refs/heads/main' + runs-on: ubuntu-latest + needs: pages + + permissions: + pages: write + id-token: write + + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + steps: + - name: Deploy Pages + id: deployment + uses: actions/deploy-pages@v2 + test: strategy: matrix: |