diff --git a/.github/workflows/docker-hub-latest.yml b/.github/workflows/docker-hub-latest.yml index 9040b1f9..4ae92d84 100644 --- a/.github/workflows/docker-hub-latest.yml +++ b/.github/workflows/docker-hub-latest.yml @@ -8,7 +8,7 @@ on: env: DOCKER_NAMESPACE: halfshot 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' }} jobs: diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 1529c5af..7c9619ca 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -2,10 +2,10 @@ name: Build docs on: 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: deploy: @@ -22,6 +22,7 @@ jobs: - name: Deploy latest uses: peaceiris/actions-gh-pages@v3 + if: env.PUSH with: github_token: ${{ secrets.GITHUB_TOKEN }} keep_files: true