-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deploy documentation to static sites (#83)
* add build docs * debugging * debugging * arm? * continue debugging * deploy docs to gh pages * change documentation zip structure and artifact name typo * clean up permissions * add githubpages extension * try to mirror what wntr does * success! update versions? * upload pages too * refactor * resume rtd * no message * update readme; cleanup debugging * re-enable linux tests
- Loading branch information
1 parent
3c5c0a4
commit 0f232a5
Showing
4 changed files
with
113 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Deploy Documentation | ||
|
||
on: | ||
schedule: | ||
- cron: '30 3 1 */1 *' # At 03:30 on the 1st of every month | ||
push: | ||
tags: | ||
- '*' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
name: Build Documentation | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
cache: pip | ||
- name: Install dependencies | ||
run: | | ||
source ./tools/linux_ci_setup.sh | ||
- name: Build pybmds | ||
run: | | ||
source ./tools/linux_ci_env.sh | ||
python -m pip install -U pip wheel | ||
python -m pip install -e ".[docs]" | ||
- name: Build documentation | ||
run: | | ||
make docs | ||
- name: Upload Pages | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: docs/build/html | ||
|
||
deploy: | ||
name: Deploy to GitHub Pages | ||
needs: build | ||
runs-on: ubuntu-22.04 | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
steps: | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v5 | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# https://docs.readthedocs.io/en/stable/config-file/v2.html | ||
version: 2 | ||
build: | ||
os: ubuntu-22.04 | ||
tools: | ||
python: "3.12" | ||
apt_packages: | ||
# copied from `tools/linux_ci_setup.sh` | ||
- automake | ||
- build-essential | ||
- libtool | ||
- make | ||
- cmake | ||
- libgslcblas0 | ||
- libgsl-dev | ||
- libeigen3-dev | ||
- libnlopt-dev | ||
- libnlopt-cxx-dev | ||
jobs: | ||
pre_install: | ||
# environment variables configured in readthedocs web admin | ||
# variables the same as those in `tools/linux_ci_setup.sh` | ||
- env | ||
sphinx: | ||
configuration: docs/source/conf.py | ||
python: | ||
install: | ||
- method: pip | ||
path: . | ||
extra_requirements: | ||
- docs |
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
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