.github/workflows/build.yml
name: Build
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node: [10, 12, 14]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2.1.5
with:
node-version: ${{ matrix.node }}
- run: npm i
- run: npm run check-format
- run: npm run lint -- --max-warnings=0
- run: npm run build
- run: npm run test
- run: npm run docs
- name: Deploy docs to GitHub Pages
# only on version tags like v3.0.0
if: ${{ matrix.node == '14' && github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') }}
uses: JamesIves/github-pages-deploy-action@4.1.1
with:
branch: gh-pages
folder: docs
clean: true