fix double help #337
This file contains hidden or 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 is the github action that builds the documentation and posts it to github-pages | |
| name: "Sphinx: Render docs" | |
| on: | |
| push: | |
| branches: ["main", "master"] | |
| tags: | |
| - 'v[0-9]*.*' # v1, v1.2, v1.2.3, v2025.09.04, etc. | |
| - '[0-9]*\.[0-9]*\.*' # 1, 1.2, 1.2.3, 2025.09.04, etc. | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: docs-${{ github.ref }} #"pages" | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up micromamba (conda-forge + optional org channel) | |
| uses: mamba-org/setup-micromamba@v2 | |
| with: | |
| init-shell: bash | |
| cache-downloads: true | |
| environment-name: docs | |
| # The python here should be coordinated with pyproj.toml. | |
| # The others are a minimal set of things needed to bootstrap the build | |
| # versions should be coordinated with pyproj.toml | |
| create-args: >- | |
| python=3.12 | |
| setuptools>=68 | |
| setuptools_scm | |
| numpy>2 | |
| numpydoc | |
| condarc: | | |
| channel_priority: strict | |
| channels: | |
| - conda-forge | |
| - cadwr-dms # keep if you publish your internal deps here | |
| - name: Overlay current checkout (no pip deps) | |
| env: | |
| PIP_NO_INDEX: "1" # optional hard guard against PyPI | |
| PIP_NO_BUILD_ISOLATION: "1" | |
| run: | | |
| micromamba run -n docs python -m pip install --upgrade pip | |
| micromamba run -n docs python -m pip install -e . --no-deps --no-build-isolation -v | |
| - name: Install schimpy (from conda channels) | |
| shell: bash -l {0} | |
| run: | | |
| micromamba activate docs | |
| python scripts/install_extras.py | |
| micromamba install -y -c conda-forge -c cadwr-dms schimpy | |
| - name: Install docs extras from pyproject via conda | |
| run: | | |
| micromamba run -n docs python scripts/install_docs_extras.py | |
| - name: Build Sphinx | |
| shell: bash -l {0} | |
| env: | |
| # flip to "0" if/when you want a full unmocked build | |
| DOCS_USE_MOCKS: "0" | |
| run: | | |
| sphinx-apidoc --force -o . ../schimpy -T --templatedir ./_templates | |
| make -C docsrc clean | |
| make -C docsrc html | |
| # Upload the built site as a Pages artifact | |
| - name: Upload Pages artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: docs/html | |
| deploy: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages # 👈 this resolves your 400 error | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 | |