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