From 6fc7670b51c106192e5c99604f4f8ee04096ad29 Mon Sep 17 00:00:00 2001 From: Dan Marshall Date: Wed, 11 Nov 2026 11:55:44 -0800 Subject: [PATCH] Keep Pages previews from overwriting production Restrict preview artifacts to pull requests and remove production deployment. Leave publishing to the configured main/docs Pages source. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: eca2adda-c35b-4e8c-9fdb-5da48c2ae88e --- .github/workflows/pages-preview.yml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/.github/workflows/pages-preview.yml b/.github/workflows/pages-preview.yml index 5c9425eb..33584722 100644 --- a/.github/workflows/pages-preview.yml +++ b/.github/workflows/pages-preview.yml @@ -1,8 +1,6 @@ name: Pages PR Preview on: - push: - branches: [ main ] pull_request: branches: [ main ] @@ -10,13 +8,9 @@ jobs: deploy: runs-on: ubuntu-latest permissions: - pages: write - id-token: write + pages: read contents: read issues: write - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -24,9 +18,6 @@ jobs: - uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0 with: path: . - - uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0 - id: deployment - if: github.event_name == 'push' - name: Comment PR with preview artifact link if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository continue-on-error: true