Catch up: develop to main (#402) #9
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: Build & deploy sphinx document | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
jobs: | |
build-deploy: | |
name: Build & deploy sphinx document | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- name: Install Dependencies | |
run: | | |
python -m pip install sphinx sphinx_rtd_theme nbsphinx | |
python -m pip install . | |
python -m pip install pyscf | |
- name: Run build command | |
run: | | |
sphinx-apidoc -o ./docs/source ./tangelo | |
sphinx-build -M html ./docs/source ./docs/build -E | |
mkdir -p ./docs/build/html/docs/source/_static/img | |
cp ./docs/source/_static/img/quantum_workflow.png ./docs/build/html/docs/source/_static/img | |
cp ./docs/source/_static/img/tangelo_logo_gradient.png ./docs/build/html/docs/source/_static/img | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
publish_branch: gh-pages | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./docs/build/html | |
force_orphan: true | |
user_name: 'github-actions[bot]' | |
user_email: 'github-actions[bot]@users.noreply.github.com' |