build #143
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: build | |
on: | |
push: | |
branches: | |
- main | |
- dev | |
pull_request: | |
branches: | |
- main | |
- dev | |
schedule: | |
- cron: '0 0 15 * *' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
- name: Install pnpm | |
run: npm install -g pnpm@^8 | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Execute tests | |
run: npm run test | |
- name: Upload coverage report | |
uses: codecov/codecov-action@v3 | |
with: | |
fail_ci_if_error: false | |
- run: npm run build | |
- run: npm run docs | |
- name: Deploy to gh-pages | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
branch: gh-pages | |
folder: docs | |
single-commit: true | |
clean: true |