From 1e390db8dcde8ef80ea7a86d961a92410cf45e00 Mon Sep 17 00:00:00 2001 From: Bobby Date: Wed, 22 Apr 2026 06:37:00 +0530 Subject: Drop configure-pages enablement; Pages must be enabled once by hand MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit configure-pages@v5 with enablement: true fails on a fresh repo with "Resource not accessible by integration" — creating a Pages site is administration-scoped and the workflow's GITHUB_TOKEN only carries pages: write, which is enough to deploy but not to provision. The one-time manual step is: Settings → Pages → Source: GitHub Actions. After that, this workflow is idempotent and deploys on every push. --- .github/workflows/deploy.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 422eac5..c8e6671 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -41,11 +41,11 @@ jobs: env: BASE_PATH: /${{ github.event.repository.name }} + # Pages must be enabled once in Settings → Pages with Source set to + # "GitHub Actions". The workflow's GITHUB_TOKEN can't provision the + # site itself (creating a Pages site is administration-scoped, beyond + # the `pages: write` permission this workflow holds). - uses: actions/configure-pages@v5 - with: - # Enable Pages via the workflow's token on first run so the repo - # doesn't need a manual trip to Settings → Pages. - enablement: true - uses: actions/upload-pages-artifact@v3 with: -- cgit v1.2.3