File tree Expand file tree Collapse file tree 1 file changed +29
-23
lines changed Expand file tree Collapse file tree 1 file changed +29
-23
lines changed Original file line number Diff line number Diff line change 1
- name : Deploy
1
+ name : Deploy to GitHub Pages
2
2
3
3
on :
4
4
push :
5
5
branches :
6
6
- master
7
7
8
+ permissions :
9
+ contents : read
10
+ pages : write
11
+ id-token : write
12
+
13
+ concurrency :
14
+ group : " pages"
15
+ cancel-in-progress : false
16
+
8
17
jobs :
9
18
build :
10
- name : Build
11
19
runs-on : ubuntu-latest
12
20
13
21
steps :
14
- - name : Checkout repo
15
- uses : actions/checkout@v3
22
+ - name : Checkout repository
23
+ uses : actions/checkout@v4
16
24
17
25
- name : Setup Node
18
26
uses : actions/setup-node@v3
27
+ with :
28
+ node-version : ' 18'
19
29
20
30
- name : Install dependencies
21
- uses : bahmutov/ npm-install@v1
31
+ run : npm ci
22
32
23
- - name : Build project
33
+ - name : Build the site
24
34
run : npm run build
25
-
26
- - name : Upload production-ready build files
27
- uses : actions/upload-artifact@v3
35
+
36
+ - name : Configure GitHub Pages
37
+ uses : actions/configure-pages@v4
38
+
39
+ - name : Upload GitHub Pages artifact
40
+ uses : actions/upload-pages-artifact@v3
28
41
with :
29
- name : production-files
30
42
path : ./dist
31
43
32
44
deploy :
33
- name : Deploy
34
- needs : build
35
45
runs-on : ubuntu-latest
36
- if : github.ref == 'refs/heads/master'
46
+ needs : build
47
+ environment :
48
+ name : github-pages
49
+ url : ${{ steps.deployment.outputs.page_url }}
37
50
38
51
steps :
39
- - name : Download artifact
40
- uses : actions/upload-artifact@v2
41
- with :
42
- name : production-files
43
- path : ./dist
52
+ - name : Deploy to GitHub Pages
53
+ id : deployment
54
+ uses : actions/deploy-pages@v4
44
55
45
- - name : Upload production-ready build files
46
-
47
- with :
48
- name : production-files
49
- path : ./dist
You can’t perform that action at this time.
0 commit comments