Skip to content

Commit cd42465

Browse files
committed
ci/gha: automatically update binaries in demo pages
1 parent 45addf4 commit cd42465

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/emscripten.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,32 @@ jobs:
3838
with:
3939
name: js
4040
path: dist/js
41+
42+
43+
update_gh-pages:
44+
if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/master'
45+
needs: build
46+
runs-on: ubuntu-latest
47+
steps:
48+
- name: Checkout
49+
uses: actions/checkout@v2
50+
with:
51+
ref: gh-pages
52+
53+
- name: Remove old assets
54+
run: rm -fr assets/js
55+
56+
- name: Download nightly build
57+
uses: actions/download-artifact@v2
58+
with:
59+
name: js
60+
path: assets/js
61+
62+
- name: Push new version
63+
run: |
64+
git config --global user.email "actions@noreply.github.com"
65+
git config --global user.name "GitHub Action"
66+
git add assets/js
67+
git commit -m "$(printf \
68+
"Update binaries to latest nightly\n\nFrom %s" "${{ github.sha }}")"
69+
git push origin gh-pages

0 commit comments

Comments
 (0)