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
13 changes: 10 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,24 @@ 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
env:
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 }}
Expand Down