Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,7 @@ jobs:
path: htmlcov/
retention-days: 14

# Builds the docs (with the coverage report under /coverage) on every run;
# deploys them to https://wbgeo.github.io/ only from main, and only once the repository
# variable DEPLOY_DOCS is "true" (and the secret DOCS_DEPLOY_KEY is set).
# Builds the docs (with the coverage report under /coverage) on every run.
docs:
needs: test
runs-on: ubuntu-latest
Expand Down Expand Up @@ -109,8 +107,24 @@ jobs:
path: public/
retention-days: 14

# Deploys the docs to https://wbgeo.github.io/.
# Only from the main branch and the main environment,
# and only once the variable DEPLOY_DOCS is "true" (and the secret DOCS_DEPLOY_KEY is set).
# DEPLOY_DOCS and the secret DOCS_DEPLOY_KEY live in that environment.
deploy-docs:
needs: docs
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
environment: main
steps:
- uses: actions/download-artifact@v4
if: vars.DEPLOY_DOCS == 'true'
with:
name: site
path: public

- name: Deploy to wbgeo.github.io
if: vars.DEPLOY_DOCS == 'true' && github.event_name == 'push' && github.ref == 'refs/heads/main'
if: vars.DEPLOY_DOCS == 'true'
uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453
with:
deploy_key: ${{ secrets.DOCS_DEPLOY_KEY }}
Expand Down