@@ -20,19 +20,6 @@ defaults:
2020 shell : bash
2121
2222jobs :
23- check_liascript_changes :
24- runs-on : ubuntu-latest
25- outputs :
26- should_build : ${{ steps.check.outputs.should_build }}
27- steps :
28- - name : Check LiaScript repository
29- id : check
30- run : |
31- LAST_COMMIT=$(curl -s https://api.github.com/repos/LiaScript/LiaScript/commits/development | jq -r '.sha')
32- echo "Last commit: $LAST_COMMIT"
33- echo "should_build=$([ "$LAST_COMMIT" != "$(cat .liascript_last_commit 2>/dev/null)" ] && echo 'true' || echo 'false')" >> $GITHUB_OUTPUT
34- echo $LAST_COMMIT > .liascript_last_commit
35-
3623 hugo :
3724 runs-on : ubuntu-latest
3825 env :
7562 path : ./public
7663
7764 liascript :
78- needs : check_liascript_changes
79- if : needs.check_liascript_changes.outputs.should_build == 'true'
8065 runs-on : ubuntu-latest
8166 steps :
8267 - name : Set ELM_HOME
@@ -109,15 +94,7 @@ jobs:
10994 name : course
11095 path : ./LiaScript/dist
11196
112- - name : Cache LiaScript artifact
113- uses : actions/cache@v2
114- with :
115- path : ./LiaScript/dist
116- key : ${{ runner.os }}-liascript-${{ github.sha }}
117-
11897 liascript-nightly :
119- needs : check_liascript_changes
120- if : needs.check_liascript_changes.outputs.should_build == 'true'
12198 runs-on : ubuntu-latest
12299 steps :
123100 - name : Set ELM_HOME
@@ -151,20 +128,13 @@ jobs:
151128 name : nightly
152129 path : ./LiaScript/dist
153130
154- - name : Cache LiaScript-nightly artifact
155- uses : actions/cache@v2
156- with :
157- path : ./LiaScript/dist
158- key : ${{ runner.os }}-liascript-nightly-${{ github.sha }}
159-
160131 deploy :
161132 environment :
162133 name : github-pages
163134 url : ${{ steps.deployment.outputs.page_url }}
164135 runs-on : ubuntu-latest
165136 needs :
166137 - hugo
167- - check_liascript_changes
168138 - liascript
169139 - liascript-nightly
170140 steps :
@@ -212,22 +182,6 @@ jobs:
212182 tar -xvf public/nightly/artifact.tar -C public/nightly
213183 rm public/nightly/artifact.tar
214184
215- - name : Download or use cached LiaScript artifact
216- uses : actions/cache@v2
217- with :
218- path : ./public/course
219- key : ${{ runner.os }}-liascript-${{ github.sha }}
220- restore-keys : |
221- ${{ runner.os }}-liascript-
222-
223- - name : Download or use cached LiaScript-nightly artifact
224- uses : actions/cache@v2
225- with :
226- path : ./public/nightly
227- key : ${{ runner.os }}-liascript-nightly-${{ github.sha }}
228- restore-keys : |
229- ${{ runner.os }}-liascript-nightly-
230-
231185 - name : Deploy to GitHub Pages
232186 uses : peaceiris/actions-gh-pages@v3
233187 with :
0 commit comments