From 148fb7eb69f450fcfa100a8de2eea3255d9da705 Mon Sep 17 00:00:00 2001 From: Xuan Hu Date: Thu, 8 Feb 2024 04:03:15 +0000 Subject: [PATCH 1/2] ci: Set dynamic CI_PAGES_URL env for ci workflow on GitHub. --- .github/workflows/ci.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bfa6cf6d..61dbacc9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,9 +14,15 @@ jobs: with: cache: true python-version: ${{ matrix.python-version }} + - id: pages + name: Setup pages + uses: actions/configure-pages@v4 - run: env | sort - run: make dev - - run: make lint test doc build + - run: make lint + - run: make test + - run: CI_PAGES_URL=${{ steps.pages.outputs.base_url }} make doc + - run: make build strategy: matrix: python-version: From 51b7049bec99babc14651ce0b7b84e42e8cd87ad Mon Sep 17 00:00:00 2001 From: Xuan Hu Date: Thu, 8 Feb 2024 04:05:23 +0000 Subject: [PATCH 2/2] Update template. --- .../workflows/ci.yml.jinja | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/template/[% if repo_host_type == 'github.com' %].github[% endif %]/workflows/ci.yml.jinja b/template/[% if repo_host_type == 'github.com' %].github[% endif %]/workflows/ci.yml.jinja index 1ad73d01..92f57ffb 100644 --- a/template/[% if repo_host_type == 'github.com' %].github[% endif %]/workflows/ci.yml.jinja +++ b/template/[% if repo_host_type == 'github.com' %].github[% endif %]/workflows/ci.yml.jinja @@ -15,9 +15,15 @@ jobs: with: cache: true python-version: {{ '${{ matrix.python-version }}' }} + - id: pages + name: Setup pages + uses: actions/configure-pages@v4 - run: env | sort - run: make dev - - run: make lint test doc build + - run: make lint + - run: make test + - run: CI_PAGES_URL={{ '${{ steps.pages.outputs.base_url }}' }} make doc + - run: make build strategy: matrix: python-version: