Skip to content

Commit e080f00

Browse files
sirdeggenclaude
andcommitted
fix: switch Pages deploy to actions/upload-pages-artifact
Replaced commit-to-docs approach with proper GitHub Pages artifact upload. Avoids Jekyll processing, no docs/ dir needed in repo, and sets build_type=workflow in Pages settings. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 6b6dd81 commit e080f00

1 file changed

Lines changed: 23 additions & 14 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,16 @@ on:
55
branches: [main]
66

77
permissions:
8-
contents: write
8+
contents: read
9+
pages: write
10+
id-token: write
11+
12+
concurrency:
13+
group: pages
14+
cancel-in-progress: true
915

1016
jobs:
11-
build-and-deploy:
17+
build:
1218
runs-on: ubuntu-latest
1319
steps:
1420
- uses: actions/checkout@v4
@@ -24,15 +30,18 @@ jobs:
2430
- name: Build
2531
run: npm run build
2632

27-
- name: Move build to docs/
28-
run: |
29-
rm -rf docs
30-
mv dist docs
31-
32-
- name: Commit and push docs/
33-
run: |
34-
git config user.name "github-actions[bot]"
35-
git config user.email "github-actions[bot]@users.noreply.github.com"
36-
git add docs/
37-
git diff --staged --quiet || git commit -m "chore: deploy to docs/ [skip ci]"
38-
git push
33+
- name: Upload Pages artifact
34+
uses: actions/upload-pages-artifact@v3
35+
with:
36+
path: ./dist
37+
38+
deploy:
39+
needs: build
40+
runs-on: ubuntu-latest
41+
environment:
42+
name: github-pages
43+
url: ${{ steps.deployment.outputs.page_url }}
44+
steps:
45+
- name: Deploy to GitHub Pages
46+
id: deployment
47+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)