File tree 1 file changed +55
-0
lines changed
1 file changed +55
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Sample workflow for building and deploying a Next.js site to GitHub Pages
2
+ #
3
+ # To get started with Next.js see: https://nextjs.org/docs/getting-started
4
+ #
5
+ name : Deploy Next.js site to Pages
6
+
7
+ on :
8
+ # Runs on pushes targeting the default branch
9
+ push :
10
+ branches : ["main"]
11
+
12
+ # Allows you to run this workflow manually from the Actions tab
13
+ workflow_dispatch :
14
+
15
+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
16
+ permissions :
17
+ contents : read
18
+ pages : write
19
+ id-token : write
20
+
21
+ # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
22
+ # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
23
+ concurrency :
24
+ group : " pages"
25
+ cancel-in-progress : false
26
+
27
+ jobs :
28
+ # Build job
29
+ build :
30
+ runs-on : ubuntu-latest
31
+ steps :
32
+ - name : Checkout
33
+ uses : actions/checkout@v4
34
+ - name : Setup Pages
35
+ uses : actions/configure-pages@v5
36
+ - name : Install dependencies
37
+ run : npm install
38
+ - name : Build
39
+ run : npm run build
40
+ - name : Upload artifact
41
+ uses : actions/upload-pages-artifact@v3
42
+ with :
43
+ path : ./dist
44
+
45
+ # Deployment job
46
+ deploy :
47
+ environment :
48
+ name : github-pages
49
+ url : ${{ steps.deployment.outputs.page_url }}
50
+ runs-on : ubuntu-latest
51
+ needs : build
52
+ steps :
53
+ - name : Deploy to GitHub Pages
54
+ id : deployment
55
+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments