diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8aeb3af5..45094f68 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -2,8 +2,6 @@ name: Deploy Hugo site to Pages on: push: - branches: - - main workflow_dispatch: permissions: @@ -45,10 +43,13 @@ jobs: run: make -C community.hachyderm.io hugo - name: Upload artifact uses: actions/upload-pages-artifact@v3 + if: ${{ github.ref == 'refs/heads/main' }} with: path: community.hachyderm.io/public/ + # Only run deploy on main branch, all others just run the build as a CI step. deploy: + if: ${{ github.ref == 'refs/heads/main' }} environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }}