Skip to content

Fix save package

Fix save package #131

Workflow file for this run

name: Documentation
on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]"
pull_request: { branches: [ "main" ] }
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:
miniforge-variant: Mambaforge
- name: install dependencies
shell: bash -l {0}
run: |
mamba env update --quiet -n test -f environment.yml
conda list
- name: install unitpackage
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/unitpackage
touch generated/html/unitpackage/.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())"`
- name: detect broken links
shell: bash -l {0}
run: |
python -m http.server 8880 --directory doc/generated/html &
sleep 1
linkchecker --check-extern http://localhost:8880/unitpackage/ --no-robots --ignore mybinder.org
- uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: doc/generated/html/unitpackage
target-folder: docs
single-commit: true
if: ${{ github.event_name == 'push' }}