Skip to content

Small bug fix for fcidump output function (#257) #1969

Small bug fix for fcidump output function (#257)

Small bug fix for fcidump output function (#257) #1969

Workflow file for this run

#Author(s): Minsik Cho
# Based on: https://docs.github.com/en/actions/use-cases-and-examples/building-and-testing/building-and-testing-python
name: Test building docs and deploy docs for merges to main
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build-doc:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # get all refs for multiversion docs build
submodules: recursive
- 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 --upgrade --upgrade-strategy eager -r docs/requirements.txt
pip install .
- name: Install LaTeX dependencies
run: |
sudo apt-get update
sudo apt-get install -y texlive-latex-recommended \
texlive-latex-extra \
texlive-fonts-recommended \
latexmk
- name: Check if quemb imports
run: python -c "import quemb; print('quemb imported successfully')"
- name: Test building LaTeX PDF docs
run: |
cd docs
make latexpdf
ls build/latex/*.pdf
cp build/latex/*.pdf source/_static/
- name: Test building html doc & Archive the results
run: |
cd docs
sphinx-multiversion -W --keep-going -n source build/html
ls build/html
tar czf docs.tar.gz --directory=build/html .
cd ..
- name: Redirect to docs for main
run: |
cp docs/index.html docs/build/html/
- name: Upload docs as an artifact
uses: actions/upload-artifact@v4
with:
name: docs
path: docs/docs.tar.gz
retention-days: 3
- name: Publish docs to Github Pages
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/build/html
keep_files: true