[BUGFIX] Fix import error #745
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: documentation | |
on: | |
push: | |
branches: | |
- dev | |
pull_request: | |
branches: | |
- dev | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
# https://github.com/marketplace/actions/setup-miniconda#use-a-default-shell | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
# See: https://github.com/marketplace/actions/setup-miniconda | |
- name: Setup miniconda | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
auto-update-conda: true | |
miniforge-variant: Mambaforge | |
environment-file: environment-dev.yml | |
use-mamba: true | |
- name: Install pyjanitor | |
# use editable mode to avoid _pytest.pathlib.ImportPathMismatchError | |
run: pip install -e . | |
- name: Build docs | |
run: mkdocs build | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: website | |
path: site/ | |
- name: Test docs | |
run: pytest -m "documentation" | |
- name: Docs preview | |
if: ${{ github.event_name == 'pull_request' }} | |
uses: nwtgck/actions-netlify@v1.1 | |
with: | |
publish-dir: "./site" | |
production-deploy: false | |
github-token: ${{ secrets.GHPAGES_TOKEN }} | |
deploy-message: "Deploy from GitHub Actions" | |
enable-pull-request-comment: true | |
enable-commit-comment: false | |
overwrites-pull-request-comment: true | |
alias: deploy-preview-${{ github.event.number }} | |
env: | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | |
timeout-minutes: 1 | |
- name: Deploy website | |
if: ${{ github.event_name == 'push' }} | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
# https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-set-personal-access-token-personal_token | |
personal_token: ${{ secrets.GHPAGES_TOKEN }} | |
publish_dir: ./site/ | |
publish_branch: gh-pages | |
# destination_dir: manuscript | |
allow_empty_commit: false | |
keep_files: false | |
force_orphan: true | |
enable_jekyll: false | |
disable_nojekyll: false |