From d96d5813f702e392805af643ec4cce777ec7eef4 Mon Sep 17 00:00:00 2001 From: Jay Ravaliya Date: Tue, 28 Apr 2026 19:40:26 -0400 Subject: [PATCH] Run build on pull_request; gate deploy + artifact upload to push:main Closes #8. PRs now get a build status check; deploy job and Pages artifact upload are gated to push events on main so PRs never deploy. Concurrency moved from workflow level to the deploy job so PR builds don't share the `pages` group with in-flight deploys. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/deploy.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f8018b0..071c59f 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -3,6 +3,7 @@ name: Deploy site to GitHub Pages on: push: branches: [main] + pull_request: workflow_dispatch: permissions: @@ -10,10 +11,6 @@ permissions: pages: write id-token: write -concurrency: - group: pages - cancel-in-progress: true - jobs: build: runs-on: ubuntu-latest @@ -34,13 +31,18 @@ jobs: run: npm run build - name: Upload Pages artifact + if: github.event_name == 'push' && github.ref == 'refs/heads/main' uses: actions/upload-pages-artifact@v5 with: path: ./dist deploy: + if: github.event_name == 'push' && github.ref == 'refs/heads/main' needs: build runs-on: ubuntu-latest + concurrency: + group: pages + cancel-in-progress: true environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }}