Skip to content

Commit 4eefaad

Browse files
committed
chore: workflow file updated
1 parent 6750a6f commit 4eefaad

File tree

1 file changed

+21
-8
lines changed

1 file changed

+21
-8
lines changed

.github/workflows/deploy.yml

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Deploy Next.js static site
1+
name: Deploy Next.js static site to GitHub Pages
22

33
on:
44
push:
@@ -14,12 +14,12 @@ concurrency:
1414
cancel-in-progress: false
1515

1616
jobs:
17-
build-and-deploy:
17+
build:
1818
runs-on: ubuntu-latest
1919
steps:
2020
- name: Checkout repository
2121
uses: actions/checkout@v4
22-
22+
2323
- name: Setup Node.js
2424
uses: actions/setup-node@v4
2525
with:
@@ -28,11 +28,24 @@ jobs:
2828
- name: Install dependencies
2929
run: npm ci
3030

31-
- name: Build and export static site
31+
- name: Build static site
3232
run: npm run build
3333

34-
- name: Deploy to GitHub Pages
35-
uses: peaceiris/actions-gh-pages@v4
34+
- name: Upload artifact for deployment
35+
uses: actions/upload-pages-artifact@v3
3636
with:
37-
github_token: ${{ secrets.GITHUB_TOKEN }}
38-
publish_dir: ./out
37+
path: ./out
38+
39+
deploy:
40+
needs: build
41+
runs-on: ubuntu-latest
42+
permissions:
43+
pages: write
44+
id-token: write
45+
environment:
46+
name: github-pages
47+
url: ${{ steps.deployment.outputs.page_url }}
48+
steps:
49+
- name: Deploy to GitHub Pages
50+
id: deployment
51+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)