actions/configure-pages "Pages site failed" - Enable & Fix
actions/configure-pages cannot prepare the Pages deployment because Pages is not enabled with GitHub Actions as the source, or the job lacks the permissions Pages deployment needs.
What this error means
The configure-pages step fails saying it could not get or create the Pages site, often with a 404 or "Pages site failed". The deploy never proceeds because the site is not configured for Actions.
Error: Get Pages site failed. Please verify that the repository has Pages
enabled and configured to build using GitHub Actions
HttpError: Not FoundCommon causes
Pages not set to the Actions source
In repo Settings > Pages, the build source must be "GitHub Actions". If Pages is disabled or set to a branch, configure-pages cannot find a site to configure.
Missing Pages permissions
Pages deployment needs pages: write and id-token: write on the job. Without them the configure/deploy steps cannot operate on the site.
How to fix it
Enable Pages with the Actions source and set permissions
permissions:
pages: write
id-token: write
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/configure-pages@v5Verify the repo Pages setting
- Settings > Pages > Build and deployment > Source = GitHub Actions.
- Confirm the repository has Pages available for its visibility/plan.
- Pair configure-pages with upload-pages-artifact and deploy-pages in the same workflow.
How to prevent it
- Set the Pages source to GitHub Actions before running the workflow.
- Declare pages: write and id-token: write for Pages jobs.
- Keep configure/upload/deploy Pages actions on compatible versions.