Add pixi setup to replace environment.yml #970
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 } | |
- uses: prefix-dev/[email protected] | |
with: { pixi-version: v0.28.2 } | |
- name: build documentation | |
run: | | |
pixi run doc | |
cd doc | |
mv generated/html generated/html_ | |
mkdir generated/html | |
mv generated/html_ generated/html/svgdigitizer touch generated/html/svgdigitizer/.nojekyll | |
- name: fix permissions | |
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: pixi shell -e doc | |
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 | |