File tree 1 file changed +56
-0
lines changed
1 file changed +56
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Build & deploy
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+ pull_request :
8
+ branches :
9
+ - main
10
+
11
+ jobs :
12
+ build :
13
+ name : Build
14
+ runs-on : ubuntu-latest
15
+
16
+ steps :
17
+ - name : Checkout code
18
+ uses : actions/checkout@v4
19
+
20
+ - name : Prepare bun
21
+ uses : oven-sh/setup-bun@v1
22
+ with :
23
+ bun-version : latest
24
+
25
+ - name : Installing
26
+ run : bun i
27
+
28
+ - name : Building project
29
+ run : bun run build
30
+
31
+ - name : Uploading production-ready dist files
32
+ uses : actions/upload-artifact@v4
33
+ with :
34
+ name : production-files
35
+ path : ./dist
36
+
37
+ deploy :
38
+ name : Deploy
39
+ needs : build
40
+ runs-on : ubuntu-latest
41
+ permissions :
42
+ contents : write
43
+ if : github.ref == 'refs/heads/main'
44
+
45
+ steps :
46
+ - name : Downloading artifact
47
+ uses : actions/download-artifact@v4
48
+ with :
49
+ name : production-files
50
+ path : ./dist
51
+
52
+ - name : Deploying to gh-pages
53
+ uses : peaceiris/actions-gh-pages@v4
54
+ with :
55
+ github_token : ${{ secrets.GITHUB_TOKEN }}
56
+ publish_dir : ./dist
You can’t perform that action at this time.
0 commit comments