Merge pull request #13 from blinxen/main #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |