Skip to content

Commit

Permalink
Merge pull request #6 from gbprod/chore-ci-workflow
Browse files Browse the repository at this point in the history
chore(ci): introduce gh-page
  • Loading branch information
gbprod authored Oct 31, 2022
2 parents 6a01f20 + e97aefc commit 3de59d5
Show file tree
Hide file tree
Showing 17 changed files with 44 additions and 1,066 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Build/test
name: CI
on:
pull_request:
branches:
- "**"
- '**'
push:
branches:
- "main"
- 'main'
jobs:
test:
runs-on: ${{ matrix.os }}
Expand All @@ -14,8 +14,8 @@ jobs:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm install
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/gh-page.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
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: |
cd ./gh-pages
git add *.wasm
git commit -m "Generate WASM binding" || true
git push
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
/node_modules/
/build/
324 changes: 0 additions & 324 deletions build/Makefile

This file was deleted.

1 change: 0 additions & 1 deletion build/Release/.deps/Makefile.d

This file was deleted.

This file was deleted.

Loading

0 comments on commit 3de59d5

Please sign in to comment.