File tree Expand file tree Collapse file tree 1 file changed +21
-8
lines changed
Expand file tree Collapse file tree 1 file changed +21
-8
lines changed Original file line number Diff line number Diff line change 1- name : Deploy Next.js static site
1+ name : Deploy Next.js static site to GitHub Pages
22
33on :
44 push :
@@ -14,12 +14,12 @@ concurrency:
1414 cancel-in-progress : false
1515
1616jobs :
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
You can’t perform that action at this time.
0 commit comments