Fixes for DMRG UnitTests - Draft #454
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
# Author(s): Minsik Cho | |
# Based on: https://docs.github.com/en/actions/use-cases-and-examples/building-and-testing/building-and-testing-python | |
name: Build docs for quemb | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
permissions: | |
contents: read | |
jobs: | |
build-doc: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.12 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
cache: 'pip' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install . | |
pip install --upgrade --upgrade-strategy eager -r docs/requirements.txt | |
echo ${{ github.workspace }} > $(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")/quemb.pth | |
- name: Test building docs & Archive the results | |
run: | | |
cd docs | |
make html SPHINXOPTS="-W --keep-going -n" | |
ls build/html | |
tar czf docs.tar.gz --directory=build/html . | |
cd .. | |
- name: Upload docs as an artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: docs | |
path: docs/docs.tar.gz | |
retention-days: 3 |