File tree Expand file tree Collapse file tree 3 files changed +25
-348
lines changed Expand file tree Collapse file tree 3 files changed +25
-348
lines changed Original file line number Diff line number Diff line change @@ -12,27 +12,41 @@ permissions:
12
12
id-token : write
13
13
14
14
jobs :
15
- deploy :
15
+ build :
16
+ name : Build
16
17
runs-on : ubuntu-latest
18
+
17
19
steps :
18
- - name : Checkout repository
20
+ - name : Checkout repo
19
21
uses : actions/checkout@v4
20
22
21
- - name : Set up Node.js
23
+ - name : Setup Node
22
24
uses : actions/setup-node@v4
23
- with :
24
- node-version : 22
25
25
26
26
- name : Install dependencies
27
27
run : npm install
28
28
29
- - name : Build the project
29
+ - name : Build project
30
30
run : npm run build
31
31
32
- - name : Configure Git
33
- run : |
34
- git config --global user.name "${{ github.actor }}"
35
- git config --global user.email "${{ github.actor }}@users.noreply.github.com"
32
+ - name : Upload production-ready build files
33
+ uses : actions/upload-artifact@v4
34
+ with :
35
+ name : production-files
36
+ path : ./dist
37
+
38
+ deploy :
39
+ name : Deploy
40
+ needs : build
41
+ runs-on : ubuntu-latest
42
+ if : github.ref == 'refs/heads/main'
43
+
44
+ steps :
45
+ - name : Download artifact
46
+ uses : actions/download-artifact@v4
47
+ with :
48
+ name : production-files
49
+ path : ./dist
36
50
37
51
- name : Deploy to GitHub Pages
38
52
uses : peaceiris/actions-gh-pages@v4
You can’t perform that action at this time.
0 commit comments