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.
This commit is contained in:
Domingo Dirutigliano 2026-09-03 09:39:05 +02:00
parent b95b87977b
commit a4271de5a4
No known key found for this signature in database

View File

@ -60,12 +60,11 @@ jobs:
pages: write pages: write
id-token: write id-token: write
steps: 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 - name: Configure Pages
uses: actions/configure-pages@v5 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 - name: Deploy
id: deployment id: deployment