-
Notifications
You must be signed in to change notification settings - Fork 5
39 lines (34 loc) · 973 Bytes
/
gh-page.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Generate gh-page
on:
push:
branches:
- main
jobs:
generate:
name: Generate Parser
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm install
- run: npm test
- name: Generate parser files
run: |
npx tree-sitter generate
npx tree-sitter build-wasm
- name: Checkout gh-pages branch to ./gh-pages
uses: actions/checkout@v3
with:
ref: gh-pages
path: ./gh-pages
- run: mv *.wasm ./gh-pages
- name: Commit generated wasm binding to the gh-pages branch
run: |
git config --global user.email "$(git log --format='%ae' HEAD^!)"
git config --global user.name "$(git log --format='%an' HEAD^!)"
cd ./gh-pages
git add *.wasm
git commit -m "Generate WASM binding" || true
git push