From 6578d8d62bab87541ed1a2aee280fa20696d6710 Mon Sep 17 00:00:00 2001 From: "Xuan (Sean) Hu" Date: Thu, 8 Feb 2024 16:00:23 +0800 Subject: [PATCH] ci: dynamic CI_PAGES_URL env for ci workflow on GitHub (#311) --- .github/workflows/ci.yml | 8 +++++++- .../workflows/ci.yml.jinja | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) 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: 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: