Skip to content

Commit 76d0860

Browse files
Shashikant86claude
andcommitted
Switch to official actions/deploy-pages for GitHub Pages deployment
The peaceiris/actions-gh-pages approach was resulting in 404s on assets despite .nojekyll being present. Using the official GitHub Pages Actions deployment which bypasses Jekyll entirely. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 444420f commit 76d0860

1 file changed

Lines changed: 22 additions & 12 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,17 @@ on:
66
workflow_dispatch:
77

88
permissions:
9-
contents: write
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: pages
15+
cancel-in-progress: false
1016

1117
jobs:
12-
build-and-deploy:
18+
build:
1319
runs-on: ubuntu-latest
14-
1520
steps:
1621
- name: Checkout
1722
uses: actions/checkout@v4
@@ -27,13 +32,18 @@ jobs:
2732
- name: Build
2833
run: npm run build
2934

30-
- name: Disable Jekyll
31-
run: touch ./dist/.nojekyll
32-
33-
- name: Deploy to gh-pages
34-
uses: peaceiris/actions-gh-pages@v4
35+
- name: Upload artifact
36+
uses: actions/upload-pages-artifact@v3
3537
with:
36-
github_token: ${{ secrets.GITHUB_TOKEN }}
37-
publish_dir: ./dist
38-
publish_branch: gh-pages
39-
force_orphan: true
38+
path: ./dist
39+
40+
deploy:
41+
environment:
42+
name: github-pages
43+
url: ${{ steps.deployment.outputs.page_url }}
44+
runs-on: ubuntu-latest
45+
needs: build
46+
steps:
47+
- name: Deploy to GitHub Pages
48+
id: deployment
49+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)