File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Deploy to GitHub Pages
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ workflow_dispatch :
8+
9+ permissions :
10+ contents : read
11+ pages : write
12+ id-token : write
13+
14+ jobs :
15+ build :
16+ runs-on : ubuntu-latest
17+ steps :
18+ - name : Checkout your repository using git
19+ uses : actions/checkout@v4
20+ - name : Setup Node.js
21+ uses : actions/setup-node@v4
22+ with :
23+ node-version : " 20"
24+ cache : " npm"
25+ - name : Install dependencies
26+ run : npm install
27+ - name : Build Next.js app
28+ run : npm run build
29+ - name : Upload artifact
30+ uses : actions/upload-pages-artifact@v3
31+ with :
32+ path : ./out
33+
34+ deploy :
35+ needs : build
36+ runs-on : ubuntu-latest
37+ environment :
38+ name : github-pages
39+ url : ${{ steps.deployment.outputs.page_url }}
40+ steps :
41+ - name : Deploy to GitHub Pages
42+ id : deployment
43+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments