File tree 1 file changed +30
-7
lines changed
1 file changed +30
-7
lines changed Original file line number Diff line number Diff line change 1
- name : Deploy to CDN
1
+ name : Build Push Deploy
2
2
3
3
on :
4
4
push :
7
7
8
8
jobs :
9
9
build :
10
- name : Build
11
10
runs-on : ubuntu-latest
12
11
steps :
13
12
- name : Checkout
@@ -19,11 +18,10 @@ jobs:
19
18
node-version : 20
20
19
cache : yarn
21
20
22
- - name : Increase network timeout
23
- run : yarn config set network-timeout 300000
24
-
25
21
- name : Install dependencies
26
- run : yarn install --prefer-offline
22
+ run : |
23
+ yarn config set network-timeout 300000
24
+ yarn install --prefer-offline
27
25
28
26
- name : Build
29
27
continue-on-error : false
36
34
path : dist
37
35
retention-days : 30
38
36
37
+ push :
38
+ needs : build
39
+ runs-on : ubuntu-latest
40
+ permissions :
41
+ contents : write
42
+ env :
43
+ BRANCH_NAME : ${{ github.head_ref || github.ref_name }}
44
+ steps :
45
+ - name : Checkout
46
+ uses : actions/checkout@v4
47
+
48
+ - name : Download artifact
49
+ uses : actions/download-artifact@v4
50
+ with :
51
+ name : dist
52
+ path : dist
53
+
54
+ - name : Push distribution
55
+ run : |
56
+ MSG="$(printf "Publish distribution\n[skip ci]")"
57
+ git config --global user.name "github-actions[bot]"
58
+ git config --global user.email "github-actions[bot]@users.noreply.github.com"
59
+ git add dist -f
60
+ git commit -m "$MSG" --no-verify --signoff
61
+ git push origin $BRANCH_NAME
62
+
39
63
deploy :
40
- name : Deploy
41
64
needs : build
42
65
runs-on : ubuntu-latest
43
66
permissions :
You can’t perform that action at this time.
0 commit comments