Migrate to pyproject.toml #924
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: [ "master" ] } | |
pull_request: { branches: [ "master" ] } | |
concurrency: | |
group: doc-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
with: { submodules: recursive } | |
- name: setup conda environment | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
python-version: "${{ matrix.python }}" | |
miniforge-variant: Mambaforge | |
- name: install dependencies | |
shell: bash -l {0} | |
run: | | |
mamba env update --quiet -n test -f environment.yml | |
conda list | |
- name: install svgdigitizer | |
shell: bash -l {0} | |
run: | | |
pip install -e . | |
- name: build documentation | |
shell: bash -l {0} | |
run: | | |
cd doc | |
make html | |
mv generated/html generated/html_ | |
mkdir generated/html | |
mv generated/html_ generated/html/svgdigitizer | |
touch generated/html/svgdigitizer/.nojekyll | |
- name: fix permissions | |
shell: bash -l {0} | |
run: | | |
# Strangely, the linkchecker modules are installed writable and linkchecker then refuses to load them. | |
chmod -R a-w `python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"` | |
- uses: JamesIves/[email protected] | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
BRANCH: gh-pages | |
FOLDER: doc/generated/html/svgdigitizer | |
TARGET_FOLDER: docs | |
if: ${{ github.event_name == 'push' }} | |
- name: detect broken links | |
shell: bash -l {0} | |
run: | | |
python -m http.server 8880 --directory doc/generated/html & | |
sleep 1 | |
# repology.org only passes the check locally but not in the Github CI. see #169 | |
linkchecker --check-extern http://localhost:8880/svgdigitizer/ --ignore-url="https://repology.org/*" --no-warnings | |