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
+ name : Deploy docs
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+ workflow_dispatch :
8
+
9
+ jobs :
10
+ build :
11
+ name : Build
12
+ runs-on : ubuntu-latest
13
+ defaults :
14
+ run :
15
+ working-directory : ./
16
+
17
+ steps :
18
+ - name : Checkout repo
19
+ uses : actions/checkout@v4
20
+
21
+ - name : Setup Node
22
+ uses : actions/setup-node@v4
23
+ with :
24
+ node-version : 20
25
+
26
+ - name : Install dependencies
27
+ run : npm install
28
+
29
+ - name : Build project
30
+ run : npm run build
31
+
32
+ - name : Upload production-ready build files
33
+ uses : actions/upload-artifact@v4
34
+ with :
35
+ name : production-files
36
+ path : ./build
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 : ./build
50
+
51
+ - name : Deploy to GitHub Pages
52
+ uses : peaceiris/actions-gh-pages@v4
53
+ with :
54
+ github_token : ${{ secrets.GITHUB_TOKEN }}
55
+ publish_dir : ./build
You can’t perform that action at this time.
0 commit comments