From 61df608e4bf6ab46d22c3fdef3a410be26062198 Mon Sep 17 00:00:00 2001 From: Santiago Soler Date: Fri, 23 Jan 2026 09:31:02 -0800 Subject: [PATCH 1/2] Always upload artifact with built website This way we can preview the website in a PR, without having to build it locally. --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cd1d42b9..ae83788c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -40,9 +40,9 @@ jobs: BASE_URL: /${{ github.event.repository.name }} # Store the website as a build artifact so we can deploy it later + # or preview the website in a PR. - name: Upload HTML website as an artifact - # Only if not a pull request - if: success() && github.event_name != 'pull_request' + if: success() uses: actions/upload-artifact@v4 with: name: html-${{ github.sha }} From b1e80e34bb383541a8beda01bc2e4feef1412942 Mon Sep 17 00:00:00 2001 From: Santiago Soler Date: Fri, 23 Jan 2026 09:56:11 -0800 Subject: [PATCH 2/2] Build website without BASE_URL in a PR --- .github/workflows/build.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ae83788c..b7759223 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,7 +32,14 @@ jobs: - name: Print MyST version run: myst --version - - name: Build website as static HTML + - name: Build website as static HTML (for PR) + if: github.event_name == 'pull_request' + run: | + echo "Building MyST website without setting BASE_URL" + myst build --html + + - name: Build website as static HTML (for deploy) + if: github.event_name != 'pull_request' run: | echo "Building MyST website using BASE_URL=" $BASE_URL myst build --html