Skip to content

Commit 0ae247e

Browse files
bingggclaude
andcommitted
🔧 Fix GitHub Pages deployment configuration
- Add automatic enablement parameter to configure-pages action - Separate build and deploy jobs for better workflow control - Add proper concurrency control for Pages deployment - Set correct permissions at workflow level This should resolve the "Pages not enabled" error and automatically configure GitHub Pages for the repository. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 60fd153 commit 0ae247e

1 file changed

Lines changed: 35 additions & 24 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 35 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,45 @@ name: Deploy to GitHub Pages
33
on:
44
push:
55
branches: [ main ]
6-
pull_request:
7-
branches: [ main ]
6+
7+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
14+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
15+
concurrency:
16+
group: "pages"
17+
cancel-in-progress: false
818

919
jobs:
10-
deploy:
20+
# Build job
21+
build:
1122
runs-on: ubuntu-latest
12-
13-
permissions:
14-
contents: read
15-
pages: write
16-
id-token: write
17-
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
- name: Setup Pages
27+
uses: actions/configure-pages@v4
28+
with:
29+
# Automatically configure GitHub Pages
30+
enablement: true
31+
- name: Upload artifact
32+
uses: actions/upload-pages-artifact@v3
33+
with:
34+
# Upload entire repository
35+
path: '.'
36+
37+
# Deployment job
38+
deploy:
1839
environment:
1940
name: github-pages
2041
url: ${{ steps.deployment.outputs.page_url }}
21-
42+
runs-on: ubuntu-latest
43+
needs: build
2244
steps:
23-
- name: Checkout
24-
uses: actions/checkout@v4
25-
26-
- name: Setup Pages
27-
uses: actions/configure-pages@v4
28-
29-
- name: Upload artifact
30-
uses: actions/upload-pages-artifact@v3
31-
with:
32-
path: '.'
33-
34-
- name: Deploy to GitHub Pages
35-
id: deployment
36-
uses: actions/deploy-pages@v4
45+
- name: Deploy to GitHub Pages
46+
id: deployment
47+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)