Skip to content

Add step that outputs the parser size in CI #7

Add step that outputs the parser size in CI

Add step that outputs the parser size in CI #7

name: Deploy to GitHub
on:
push:
tags:
- '*'
jobs:
deploy:
runs-on: ubuntu-latest
env:
EMSCRIPTEN_VERSION: '2.0.17'
steps:
- uses: actions/checkout@v3
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install Emscripten
uses: mymindstorm/setup-emsdk@v12
with:
version: ${{ env.EMSCRIPTEN_VERSION }}
- name: Install dependencies
run: npm install
- name: Compile grammar
run: npm run generate
- name: Build WASM binary
run: npm run build-wasm
- name: Deploy to GitHub Releases
uses: ncipollo/release-action@v1
with:
artifacts: tree-sitter-kotlin.wasm
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up folder for GitHub Pages deployment
run: |
mkdir public
cp tree-sitter-kotlin.wasm public/tree-sitter-parser.wasm
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
keep_files: true
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'