ci: set configure-pages enablement:false to fix Pages deploy failure
The pages-deploy job was failing with: Create Pages site failed. Error: Resource not accessible by integration `actions/configure-pages@v5` with `enablement: true` calls the GitHub API to create/enable the Pages site, which requires admin-level permissions the GITHUB_TOKEN doesn't have. Changing to `enablement: false` makes the step only configure the deployment environment URL without touching the site API. GitHub Pages must be enabled once in the repository settings (Settings → Pages → Source: GitHub Actions) for the deploy to publish a URL, but the job will no longer fail on every run. Co-authored-by: fiddlerwoaroof <808745+fiddlerwoaroof@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
1db457b7b4
commit
3706f33bd6
@@ -165,12 +165,14 @@ jobs:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
steps:
|
||||
# `enablement: true` asks the API to turn Pages on with source =
|
||||
# GitHub Actions. It succeeds only if the repository allows the workflow
|
||||
# token to do so; if it does not, this step is where the run fails and
|
||||
# the fix is the repository setting, not this file (improvise-3gy).
|
||||
# `enablement: false` (the default) configures the environment URL
|
||||
# without attempting to create or modify the Pages site via the API.
|
||||
# GitHub Pages must be enabled once in the repository settings
|
||||
# (Settings → Pages → Source: GitHub Actions) before this job will
|
||||
# produce a live URL. Using `enablement: true` fails when the workflow
|
||||
# token lacks admin permission to create the site (improvise-3gy).
|
||||
- uses: actions/configure-pages@v5
|
||||
with:
|
||||
enablement: true
|
||||
enablement: false
|
||||
- id: deployment
|
||||
uses: actions/deploy-pages@v4
|
||||
|
||||
Reference in New Issue
Block a user