-
Notifications
You must be signed in to change notification settings - Fork 33
48 lines (48 loc) · 1.42 KB
/
Copy pathgenerate.yml
File metadata and controls
48 lines (48 loc) · 1.42 KB
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
40
41
42
43
44
45
46
47
48
name: Generate
on:
push:
branches:
- main
jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Workaround for https://github.com/nodejs/node-gyp/issues/2219#issuecomment-1359162118
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install Node
uses: actions/setup-node@v2
with:
node-version: "14.x"
- name: Cache npm dependencies
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install npm dependencies
run: npm ci
- name: Generate parser
run: |
npx tree-sitter generate
npx tree-sitter build --wasm -o tree-sitter-elixir.wasm
- name: Update parser files
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Generate parser
file_pattern: src
- name: Checkout gh-pages branch to ./gh-pages
uses: actions/checkout@v4
with:
ref: gh-pages
path: ./gh-pages
- run: mv *.wasm ./gh-pages
- name: Update WASM file on gh-pages branch
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Generate WASM
file_pattern: "*.wasm"
repository: ./gh-pages