From a4271de5a412fced6041284f02403457c569a39a Mon Sep 17 00:00:00 2001 From: Domingo Dirutigliano Date: Thu, 3 Sep 2026 09:39:05 +0200 Subject: [PATCH] Enable Pages on the repository instead of from the workflow GITHUB_TOKEN cannot create a Pages site - configure-pages reported "Resource not accessible by integration" even with pages: write on the job. Pages is now enabled on the repository with source "GitHub Actions", so the step only has to read the existing configuration. --- .github/workflows/demo-pages.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/demo-pages.yml b/.github/workflows/demo-pages.yml index 3ec45a7..b3c10f0 100644 --- a/.github/workflows/demo-pages.yml +++ b/.github/workflows/demo-pages.yml @@ -60,12 +60,11 @@ jobs: pages: write id-token: write steps: + # Pages is already enabled on this repository with source "GitHub Actions". + # The `enablement: true` option cannot replace that here: GITHUB_TOKEN is not + # allowed to create a Pages site, whatever permissions the job asks for. - name: Configure Pages uses: actions/configure-pages@v5 - with: - # Turns Pages on (source: GitHub Actions) the first time this runs, so the - # repository needs no manual switch flipped in Settings. - enablement: true - name: Deploy id: deployment