@@ -10,51 +10,33 @@ jobs:
10
10
test :
11
11
runs-on : ubuntu-22.04
12
12
steps :
13
- - uses : actions/checkout@v2
13
+ - uses : actions/checkout@v3
14
14
15
- - name : Get yarn cache
16
- id : yarn-cache
17
- run : echo "::set-output name=dir::$(yarn cache dir)"
18
-
19
- - uses : actions/cache@v2
20
- name : Cache node modules of yarn
15
+ - uses : actions/setup-node@v3
21
16
with :
22
- path : ${{ steps.yarn-cache.outputs.dir }}
23
- key : ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
24
- restore-keys : |
25
- ${{ runner.os }}-yarn-
26
-
27
- - name : ACTIONS_ALLOW_UNSECURE_COMMANDS
28
- id : ACTIONS_ALLOW_UNSECURE_COMMANDS
29
- run : echo 'ACTIONS_ALLOW_UNSECURE_COMMANDS=true' >> $GITHUB_ENV
17
+ node-version : 16
18
+ cache : ' yarn'
30
19
31
- - name : add cr
32
- run : |
33
- mkdir -p $GITHUB_WORKSPACE/bin
34
- wget -O $GITHUB_WORKSPACE/bin/cr https://github.com/calcit-lang/calcit/releases/download/0.6.16/cr
35
- chmod +x $GITHUB_WORKSPACE/bin/cr
36
- echo "::add-path::$GITHUB_WORKSPACE/bin"
20
+ - uses : supplypike/setup-bin@v3
21
+ with :
22
+ uri : ' https://github.com/calcit-lang/calcit/releases/download/0.6.23/cr'
23
+ name : ' cr'
24
+ version : ' 0.6.23'
37
25
38
- - name : " prepare modules"
39
- run : >
40
- mkdir -p ~/.config/calcit/modules/ && cd ~/.config/calcit/modules/
41
- && git clone https://github.com/calcit-lang/lilac.git
42
- && git clone https://github.com/calcit-lang/memof.git
43
- && git clone https://github.com/Respo/respo.calcit.git
44
- && git clone https://github.com/Respo/reel.calcit.git
45
- && git clone https://github.com/Respo/respo-markdown.calcit.git
46
- && git clone https://github.com/Respo/respo-ui.calcit.git
47
- && git clone https://github.com/Respo/respo-router.calcit.git
48
- && git clone https://github.com/Respo/alerts.calcit.git
26
+ - uses : supplypike/setup-bin@v3
27
+ with :
28
+ uri : ' https://github.com/calcit-lang/calcit/releases/download/0.6.23/caps'
29
+ name : ' caps'
30
+ version : ' 0.6.23'
49
31
50
32
- name : " compiles to js"
51
33
run : >
52
- cr --emit-js --once
34
+ caps --ci && cr --emit-js --once
53
35
&& yarn && yarn vite build --base=./
54
36
55
37
- name : Deploy to server
56
38
id : deploy
57
- uses : Pendect/action-rsyncer@v1.1 .0
39
+ uses : Pendect/action-rsyncer@v2.0 .0
58
40
env :
59
41
DEPLOY_KEY : ${{secrets.rsync_private_key}}
60
42
with :
@@ -67,27 +49,26 @@ jobs:
67
49
- name : Display status from deploy
68
50
run : echo "${{ steps.deploy.outputs.status }}"
69
51
70
-
71
52
# also need to upload mddook
72
53
73
- - name : curl mdbook.tar.gz
74
- run : curl -L https://github.com/rust-lang/mdBook/releases/download/v0.4.14/mdbook-v0.4.14-x86_64-unknown-linux-gnu.tar.gz > ./mdbook.tar.gz
75
-
76
- - name : curl linkcheck
77
- run : curl -L https://github.com/Michael-F-Bryan/mdbook-linkcheck/releases/download/v0.7.6/mdbook-linkcheck.x86_64-unknown-linux-gnu.zip > ./linkcheck.zip
78
-
79
- - name : tar mdbook
80
- run : tar -zxvf ./mdbook.tar.gz && unzip -n ./linkcheck.zip && chmod +x mdbook-linkcheck
54
+ - uses : supplypike/setup-bin@v3
55
+ with :
56
+ uri : ' https://github.com/rust-lang/mdBook/releases/download/v0.4.14/mdbook-v0.4.14-x86_64-unknown-linux-gnu.tar.gz'
57
+ name : ' mdbook'
58
+ version : ' 0.4.14'
81
59
82
- - name : trick path
83
- run : echo "::add-path::$GITHUB_WORKSPACE/"
60
+ - uses : supplypike/setup-bin@v3
61
+ with :
62
+ uri : ' https://github.com/Michael-F-Bryan/mdbook-linkcheck/releases/download/v0.7.6/mdbook-linkcheck.x86_64-unknown-linux-gnu.zip'
63
+ name : ' mdbook-linkcheck'
64
+ version : ' 0.7.6'
84
65
85
66
- name : mdbook build
86
- run : ./ mdbook build && mv -v book/html/index.html book/html/mdbook.html
67
+ run : mdbook build && mv -v book/html/index.html book/html/mdbook.html
87
68
88
69
- name : Deploy to server
89
70
id : deploy-mdbook
90
- uses : Pendect/action-rsyncer@v1.1 .0
71
+ uses : Pendect/action-rsyncer@v2.0 .0
91
72
env :
92
73
DEPLOY_KEY : ${{secrets.rsync_private_key}}
93
74
with :
0 commit comments