Documentation #57
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: | |
schedule: | |
- cron: "0 8 * * 1" | |
push: | |
branches: [main] | |
workflow_dispatch: | |
concurrency: | |
group: actions-id-${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -el {0} | |
name: Build and Push Documentation | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: gh-pages | |
- name: Update Docs to Main | |
run: | | |
git fetch --all | |
git reset --hard origin/main | |
- uses: mamba-org/setup-micromamba@main | |
with: | |
environment-name: temp | |
condarc: | | |
channels: | |
- defaults | |
- conda-forge | |
channel_priority: flexible | |
create-args: | | |
python=3.12 | |
- name: Install Dependencies | |
run: | | |
conda install sphinx chardet | |
python -m pip install .[full] m2r | |
- name: Build Docs | |
run: | | |
m2r README.md | |
cd docs | |
make clean html | |
- name: Publish documentation | |
run: | | |
git config user.name "github-actions" | |
git config user.email "[email protected]" | |
cd docs | |
cp -r _build/html/* . | |
cp -r _build/doctrees/* . | |
echo "" > .nojekyll | |
git add -f -A .; git commit -m "Automated documentation rebuild" || true ; git push -f |