diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 2a1afe6..7c7c38a 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -73,13 +73,16 @@ jobs: mdbook-version: latest - name: Build Book run: mdbook build book --dest-dir ../www/book - - name: Deploy Book + - name: Record Git Revision if: github.ref == 'refs/heads/master' + run: git rev-parse --verify HEAD > www/head + - name: Deploy Pages uses: peaceiris/actions-gh-pages@v3 + if: github.ref == 'refs/heads/master' with: - github_token: ${{secrets.GITHUB_TOKEN}} + github_token: ${{secrets.GITHUB_TOKEN}} publish_branch: gh-pages - publish_dir: ./www + publish_dir: ./www - name: Package id: package if: startsWith(github.ref, 'refs/tags/v')