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