feat: add cli (#64) #96
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: on-push-workflow | |
on: | |
# run on push, but not on tag release | |
push: | |
branches: | |
- '**' | |
tags-ignore: | |
- '*.*' | |
jobs: | |
lint-test-build: | |
name: lint test and build | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node: [18, 20] | |
steps: | |
- name: checkout repo | |
uses: actions/checkout@v2 | |
- name: setup node ${{ matrix.node }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: install deps | |
run: npm ci | |
- name: lint | |
run: npm run lint | |
- name: test | |
run: npm run test | |
- name: build docs | |
run: npm run build:docs | |
- name: build | |
run: npm run build | |
- name: deploy docs to github pages | |
if: github.ref == 'refs/heads/main' && matrix.node == 18 | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./docs |