From 0469f7fecd296c9e0ac2360a71c81ae7c3462f1e Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Thu, 19 Mar 2020 20:42:38 -0700 Subject: [PATCH] Record current git revision in `www/head` type: documentation --- .github/workflows/build.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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')