Skip to content

Commit

Permalink
ci: Dynamic CI_PAGES_URL when building GitHub Pages and ReadTheDocs. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
huxuan committed Feb 1, 2024
1 parent 571382e commit 37c0502
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/release.yml
Expand Up @@ -10,9 +10,12 @@ jobs:
with:
cache: true
python-version: '3.12'
- id: pages
name: Setup pages
uses: actions/configure-pages@v4
- run: env | sort
- run: make dev-doc
- run: make doc
- run: CI_PAGES_URL=${{ steps.pages.outputs.base_url }} make doc
- name: Upload changelog
uses: actions/upload-artifact@v4
with:
Expand Down
3 changes: 2 additions & 1 deletion .readthedocs.yaml
Expand Up @@ -4,12 +4,13 @@ build:
- make doc-mypy
- make doc-coverage
post_checkout:
- env | sort
- git fetch --unshallow || true
post_install:
- python -m pip install --upgrade --no-cache-dir pdm
- make dev-doc
pre_build:
- make changelog
- CI_PAGES_URL=https://${READTHEDOCS_PROJECT}.readthedocs.io/${READTHEDOCS_LANGUAGE}/stable make changelog
os: ubuntu-22.04
tools:
python: '3'
Expand Down
3 changes: 2 additions & 1 deletion template/.readthedocs.yaml
Expand Up @@ -4,12 +4,13 @@ build:
- make doc-mypy
- make doc-coverage
post_checkout:
- env | sort
- git fetch --unshallow || true
post_install:
- python -m pip install --upgrade --no-cache-dir pdm
- make dev-doc
pre_build:
- make changelog
- CI_PAGES_URL=https://${READTHEDOCS_PROJECT}.readthedocs.io/${READTHEDOCS_LANGUAGE}/stable make changelog
os: ubuntu-22.04
tools:
python: '3'
Expand Down
Expand Up @@ -11,9 +11,12 @@ jobs:
with:
cache: true
python-version: '{{ default_py }}'
- id: pages
name: Setup pages
uses: actions/configure-pages@v4
- run: env | sort
- run: make dev-doc
- run: make doc
- run: CI_PAGES_URL={{ '${{ steps.pages.outputs.base_url }}' }} make doc
- name: Upload changelog
uses: actions/upload-artifact@v4
with:
Expand Down

0 comments on commit 37c0502

Please sign in to comment.