Merge pull request #58 from vliz-be-opsci/refactor #11
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 Pages | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
jobs: | |
build-html: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout this repo | |
- uses: actions/checkout@v3 | |
- uses: dorny/paths-filter@v2 | |
id: filter | |
with: | |
filters: | | |
package: | |
- 'pysubyt/**' | |
tests: | |
- 'tests/**' | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: Build Pages | |
if: ${{steps.filter.outputs.package == 'true' }} | |
run: | | |
make init-dev | |
make docs | |
- name: Coverage Badge | |
uses: JotaFan/pycoverage@v1.1.0 | |
if: ${{(steps.filter.outputs.package == 'true') || (steps.filter.outputs.tests == 'true')}} | |
with: | |
cov-omit-list: tests/*, *__init__*, *__version__*, *__main__*, *exceptions* | |
cov-threshold-single: 85 | |
cov-threshold-total: 90 | |
async-tests: true | |
output: docs/build/html/coverage.svg | |
- name: Deploy Pages | |
if: ${{steps.filter.outputs.package == 'true' }} | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./docs/build/html |