fix documentation building (#20) #52
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: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
CI_CD: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3.4.0 | |
- name: Install Node | |
uses: actions/setup-node@v3.6.0 | |
- name: Install Packages | |
run: npm ci --no-audit | |
- name: Lint | |
run: npm run lint | |
- name: Test | |
run: npm run coverage | |
- name: Report coverage | |
uses: codecov/codecov-action@v3.1.3 | |
with: | |
fail_ci_if_error: true | |
- name: Install Packages to docs | |
run: npm --prefix website ci --no-audit | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
- name: Build docs | |
run: npm --prefix website run build | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
- name: Deploy docs | |
uses: peaceiris/actions-gh-pages@v3.9.3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./website/build | |
force_orphan: true | |
allow_empty_commit: true | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' |