Update docstrings #29
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: Docs | |
# build the documentation whenever there are new commits on main | |
on: | |
push: | |
branches: [ "re-org" ] | |
pull_request: | |
branches: [ "re-org" ] | |
# Alternative: only build for tags. | |
# tags: | |
# - '*' | |
# security: restrict permissions for CI jobs. | |
permissions: | |
contents: read | |
pull-requests: write | |
jobs: | |
# Build the documentation and upload the static HTML files as an artifact. | |
build-docs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: '3.10' | |
# ADJUST THIS: install all dependencies (including pdoc) | |
- name: Add conda to system path | |
run: | | |
# $CONDA is an environment variable pointing to the root of the miniconda directory | |
echo $CONDA/bin >> $GITHUB_PATH | |
- name: Install mamba and dependencies | |
run: | | |
conda install mamba -c conda-forge | |
mamba env update --file environment.yml --name goesenv | |
source $CONDA/etc/profile.d/conda.sh | |
conda activate goesenv | |
pip install . | |
pip install pdoc3 | |
# ADJUST THIS: build your documentation into docs/. | |
# We use a custom build script for pdoc itself, ideally you just run `pdoc -o docs/ ...` here. | |
- run: | | |
source $CONDA/etc/profile.d/conda.sh | |
conda activate goesenv | |
pdoc --html goes_ortho --force --output-dir docs/ | |
- uses: actions/upload-pages-artifact@v1 | |
with: | |
path: docs/ | |
# Deploy the artifact to GitHub pages. | |
# This is a separate job so that only actions/deploy-pages has the necessary permissions. | |
deploy-docs: | |
needs: build-docs | |
runs-on: ubuntu-latest | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- id: deployment | |
uses: actions/deploy-pages@v2 |