From 913257a53e910aaea73d921f033d1a1f766b34c3 Mon Sep 17 00:00:00 2001 From: Robert Dailey Date: Sun, 7 Jan 2024 16:18:39 -0600 Subject: [PATCH] Do not publish from pull requests Due to the requirement on secrets, we do not want to publish the site from pull requests. This fixes a regression introduced in commit bdf85492. --- .github/workflows/build-and-deploy.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index ec87e81..93416b5 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -46,9 +46,9 @@ jobs: - name: Publish uses: cloudflare/pages-action@v1 - # if: | - # github.ref == 'refs/heads/master' || - # github.ref == 'refs/heads/next' + # Publish all direct pushes to the repo, for secrets access. But ignore pull requests. + # Non-master branches get published with a temporary URL (not the main site URL). + if: github.event_name != 'pull_request' with: apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}