adds workflow to generate docs on push to main #210
Workflow file for this run
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: CI | |
on: | |
push: | |
branches: | |
- 'main' | |
- 'development' | |
pull_request: | |
branches: | |
- 'main' | |
- 'development' | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build, lint, and test on Node 18.12.1 and ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ macOS-latest, ubuntu-latest] | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: '18.12.1' | |
cache: 'npm' | |
- name: build | |
run: | | |
npm cache clean --force | |
npm set registry https://registry.npmjs.org/ | |
npm i | |
npm test -- --coverage=true | |
npm run build | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
- name: Commit files | |
run: | | |
git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
git commit -a -m "Update documentation" | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.ref }} |