Build docs on each push

This commit is contained in:
Will Hunt 2021-11-29 13:36:15 +00:00
parent 65a7d96644
commit 6a5c84acd9
2 changed files with 5 additions and 4 deletions

View File

@ -8,7 +8,7 @@ on:
env: env:
DOCKER_NAMESPACE: halfshot DOCKER_NAMESPACE: halfshot
PLATFORMS: linux/amd64 PLATFORMS: linux/amd64
# Only push if this is develop, otherwise we just want to build # Only push if this is main, otherwise we just want to build
PUSH: ${{ github.ref == 'refs/heads/main' }} PUSH: ${{ github.ref == 'refs/heads/main' }}
jobs: jobs:

View File

@ -2,10 +2,10 @@ name: Build docs
on: on:
push: push:
branches:
- main
workflow_dispatch: env:
# Only push if this is main, otherwise we just want to build
PUSH: ${{ github.ref == 'refs/heads/main' }}
jobs: jobs:
deploy: deploy:
@ -22,6 +22,7 @@ jobs:
- name: Deploy latest - name: Deploy latest
uses: peaceiris/actions-gh-pages@v3 uses: peaceiris/actions-gh-pages@v3
if: env.PUSH
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }} github_token: ${{ secrets.GITHUB_TOKEN }}
keep_files: true keep_files: true