Record current git revision in www/head

type: documentation
This commit is contained in:
Casey Rodarmor 2020-03-19 20:42:38 -07:00
parent 972a1ec628
commit 0469f7fecd
No known key found for this signature in database
GPG Key ID: 556186B153EC6FE0

View File

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