Skip to content

Commit bb752da

Browse files
committed
publish
1 parent c7ee470 commit bb752da

File tree

1 file changed

+20
-12
lines changed

1 file changed

+20
-12
lines changed

.github/workflows/deploy.yml

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,33 @@
1-
# .github/workflows/deploy.yml
2-
name: Deploy static Next.js to GH Pages
1+
name: Deploy static Next.js to GH Pages (official)
32
on:
43
push:
54
branches: [ main ]
65
permissions:
7-
contents: write
6+
contents: read
7+
pages: write
8+
id-token: write
9+
concurrency:
10+
group: "pages"
11+
cancel-in-progress: true
812
jobs:
913
build:
1014
runs-on: ubuntu-latest
1115
steps:
1216
- uses: actions/checkout@v4
1317
- uses: actions/setup-node@v4
14-
with:
15-
node-version: 18
16-
cache: 'pnpm'
18+
with: { node-version: 18, cache: "pnpm" }
1719
- run: corepack enable
18-
- run: corepack prepare pnpm@9 --activate # ensures pnpm is available
19-
- run: pnpm --version # (optional) sanity check
20+
- run: corepack prepare pnpm@9 --activate
2021
- run: pnpm install --frozen-lockfile
2122
- run: pnpm build && pnpm export
22-
- uses: peaceiris/actions-gh-pages@v3
23-
with:
24-
github_token: ${{ secrets.GITHUB_TOKEN }}
25-
publish_dir: ./out
23+
- uses: actions/upload-pages-artifact@v3
24+
with: { path: ./out }
25+
deploy:
26+
needs: build
27+
runs-on: ubuntu-latest
28+
environment:
29+
name: github-pages
30+
url: ${{ steps.deployment.outputs.page_url }}
31+
steps:
32+
- id: deployment
33+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)