Skip to content

Fix version format (#32) #87

Fix version format (#32)

Fix version format (#32) #87

Workflow file for this run

name: docs
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set environment variables
run: |
echo "CURRENT_WEEK=$(date +'%Y-%U')" >> $GITHUB_ENV
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- uses: actions/cache@v4
with:
path: ${{ env.pythonLocation }}
key: v1-${{ env.CURRENT_WEEK }}-${{ env.pythonLocation }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('docs/requirements.txt') }}-${{ hashFiles('requirements-healpix.txt') }}-${{ hashFiles('constraints.txt') }}
- name: Install dependencies
run: |
python -m pip install uv
# can't use --system here because it doesn't work with --no-build-isolation and a healpix dependency
uv venv --python 3.11
uv pip install -c constraints.txt -e .[docs]
uv pip install --no-build-isolation -c constraints.txt -e .[docs,healpix]
- name: Build docs
run: |
source .venv/bin/activate
cd docs && make doctest html
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_build/
force_orphan: true