Update run_tests.yml #24
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: Generate Docs | |
on: | |
push: | |
branches: [ main ] | |
workflow_dispatch: | |
jobs: | |
generate: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -el {0} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
auto-update-conda: true | |
python-version: '3.10' | |
- name: Install Dependencies | |
run: | | |
git config user.name github-actions | |
git config user.email [email protected] | |
python -m pip install -e .[molecules] | |
python -m pip install sphinx sphinx-rtd-theme m2r mistune==0.8.4 | |
- uses: actions/checkout@v3 | |
with: | |
ref: docs | |
- name: Update Docs to Main | |
run: | | |
git fetch --all | |
git reset --hard origin/main | |
- name: Generate Documentation | |
run: | | |
cd docs | |
rm *.html *.doctree || true | |
sphinx-apidoc -f -o . .. | |
make clean | |
make html | |
cp -r _build/html/* . | |
cp -r _build/doctrees/* . | |
echo "" > .nojekyll | |
- name: Push to Docs Branch | |
run: | | |
git add . | |
git commit -m "Automated Docs Update" -a || true | |
git push -f |