Skip to content

Commit 71293a3

Browse files
committed
fix: optimize GitHub Pages deployment workflow
- Simplify Pages configuration and remove redundant setup steps - Remove manual error handling for Pages configuration - Use standard GitHub Pages deployment pattern - Reduce workflow complexity and potential conflicts with auto-generated Pages builds
1 parent a1f5d22 commit 71293a3

1 file changed

Lines changed: 7 additions & 50 deletions

File tree

.github/workflows/docs.yml

Lines changed: 7 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,17 @@ on:
77
branches: [ main ]
88
workflow_dispatch:
99

10+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
11+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
12+
concurrency:
13+
group: "pages"
14+
cancel-in-progress: false
15+
1016
permissions:
1117
contents: read
1218
pages: write
1319
id-token: write
1420

15-
concurrency:
16-
group: "pages"
17-
cancel-in-progress: false
18-
1921
jobs:
2022
build:
2123
runs-on: ubuntu-latest
@@ -75,28 +77,6 @@ jobs:
7577
7678
- name: Setup Pages
7779
uses: actions/configure-pages@v4
78-
id: pages
79-
with:
80-
# Enable automatic Pages site creation if it doesn't exist
81-
enablement: true
82-
continue-on-error: true
83-
84-
- name: Pages Setup Status
85-
run: |
86-
if [ "${{ steps.pages.outcome }}" == "failure" ]; then
87-
echo "⚠️ GitHub Pages not configured for this repository"
88-
echo "📋 To enable GitHub Pages:"
89-
echo " 1. Go to repository Settings"
90-
echo " 2. Scroll to 'Pages' section"
91-
echo " 3. Source: Deploy from a branch"
92-
echo " 4. Branch: main"
93-
echo " 5. Folder: /docs"
94-
echo " 6. Save and retry this workflow"
95-
echo ""
96-
echo "🔗 Once configured, this workflow will deploy automatically"
97-
else
98-
echo "✅ GitHub Pages configured successfully"
99-
fi
10080

10181
- name: Upload artifact
10282
uses: actions/upload-pages-artifact@v3
@@ -116,29 +96,6 @@ jobs:
11696
- name: Checkout
11797
uses: actions/checkout@v4
11898

119-
- name: Setup Pages
120-
uses: actions/configure-pages@v4
121-
id: pages
122-
with:
123-
enablement: true
124-
continue-on-error: true
125-
12699
- name: Deploy to GitHub Pages
127100
id: deployment
128-
uses: actions/deploy-pages@v4
129-
if: steps.pages.outcome == 'success'
130-
with:
131-
error-urls: true
132-
133-
- name: Deployment Status
134-
run: |
135-
if [ "${{ steps.pages.outcome }}" == "failure" ]; then
136-
echo "❌ Deployment skipped: GitHub Pages not configured"
137-
echo ""
138-
echo "📋 Manual setup required:"
139-
echo " Repository Settings → Pages → Source: Deploy from branch"
140-
echo " Branch: main, Folder: /docs"
141-
else
142-
echo "✅ Deployment completed successfully"
143-
echo "🌐 Site available at: ${{ steps.deployment.outputs.page_url }}"
144-
fi
101+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)