Skip to content
Merged
Changes from 5 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
42 changes: 22 additions & 20 deletions .github/workflows/website.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
push:
branches:
- main
pull_request:
branches:
- main


permissions:
Expand All @@ -21,34 +24,30 @@ jobs:
pages: write

steps:
# Fetch CUDA toolkit using Jimver/cuda-toolkit
- name: Fetch CUDA toolkit
uses: Jimver/cuda-toolkit@master
id: cuda-toolkit
with:
cuda: '12.8.1'
use-local-cache: false

- name: Check nvcc version
run: nvcc -V

- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: '3.11'
python-version: '3.12'

- name: Install development and distributions version
run: |
pip install --upgrade pip
pip install --upgrade pip pip-compile
Comment thread
FanwangM marked this conversation as resolved.
Outdated
git submodule update --init --recursive
pip install .[docs]
pip-compile pyproject.toml --extra docs -o requirements_docs.txt
pip install -r requirements_docs.txt

- name: Setup pandoc
uses: siacodelabs/setup-pandoc@v1
with:
xelatex: true.
# - name: Setup pandoc
# uses: siacodelabs/setup-pandoc@v1
# with:
# xelatex: true
- name: Install pandoc
uses: pandoc/actions/setup@v1

- name: Run pandoc
run: pandoc --version

# didn't need to change anything here, but had to add sphinx.ext.githubpages
# to my conf.py extensions list. that fixes the broken uploads
Expand All @@ -60,8 +59,11 @@ jobs:
# still need to build and set the PAT to get a rebuild on the pages job,
# apart from that quite clean and nice
- name: GitHub Pages Action
#if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
uses: peaceiris/actions-gh-pages@v3
if: |
(github.event_name == 'push' && github.ref == 'refs/heads/main') ||
(github.event.pull_request.merged == true &&
github.event.pull_request.base.ref == 'main')

Copilot AI Dec 7, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The condition github.event.pull_request.merged == true will not work as intended. When a pull request is merged, the triggered event is a push event to the main branch, not a pull_request event. The github.event.pull_request context will be null/undefined in push events. Since line 63 already handles the push to main case, lines 64-65 are unnecessary and will never evaluate to true. Consider removing these lines or clarifying the intended behavior.

Suggested change
(github.event_name == 'push' && github.ref == 'refs/heads/main') ||
(github.event.pull_request.merged == true &&
github.event.pull_request.base.ref == 'main')
github.event_name == 'push' && github.ref == 'refs/heads/main'

Copilot uses AI. Check for mistakes.
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./doc/_build/html
Expand Down