quarto publish action deletes pr previews #135

Open
opened 2025-10-10 13:25:25 +00:00 by jwindhager · 4 comments
jwindhager commented 2025-10-10 13:25:25 +00:00 (Migrated from github.com)

Turns out that since quarto-cli v1.3 quarto publish (and, by extension, the corresponding GHA action) cleans the site directory before rendering (see for example github.com/NBISweden/Training-Tech-shorts@b45bf0b4ad). This means that all PR previews are deleted when a PR is merged. The fix for this is to adapt the publish workflow to not use the quarto publish action, but instead resort to the quarto render action and push the rendered page to the gh-pages branch manually.

Turns out that since quarto-cli v1.3 `quarto publish` (and, by extension, the corresponding GHA action) cleans the site directory before rendering (see for example https://github.com/NBISweden/Training-Tech-shorts/commit/b45bf0b4ad0a81d4ee114eec6ab5a9981d053d23). This means that all PR previews are deleted when a PR is merged. The fix for this is to adapt the publish workflow to not use the quarto publish action, but instead resort to the quarto render action and push the rendered page to the `gh-pages` branch manually.
jwindhager commented 2025-10-10 13:27:59 +00:00 (Migrated from github.com)

I will fix this asap, but it might be a while. Happy if someone else (perhaps with copilot?) can take it before that :)

I will fix this asap, but it might be a while. Happy if someone else (perhaps with copilot?) can take it before that :)
jwindhager commented 2025-10-10 13:32:36 +00:00 (Migrated from github.com)

Just to keep the reference before closing my browser tab: github.com/quarto-dev/quarto-cli@246f070259

Just to keep the reference before closing my browser tab: https://github.com/quarto-dev/quarto-cli/commit/246f0702598ac28762a28d621e8508fd721f3b20
mahesh-panchal commented 2025-10-10 18:06:50 +00:00 (Migrated from github.com)

In practice this might not be a big issue. Normally there would likely be only one PR following a walkthrough. As long we're aware, schedule updates should only come when lessons have been merged too, so that should minimally affect previews too.

In practice this might not be a big issue. Normally there would likely be only one PR following a walkthrough. As long we're aware, schedule updates should only come when lessons have been merged too, so that should minimally affect previews too.
jwindhager commented 2025-10-10 18:25:26 +00:00 (Migrated from github.com)

Yes, and the preview is probably recreated with the next commit to the affected PR, so the impact should be relatively small. Still good to leave this issue open until fixed, I guess.

Yes, and the preview is probably recreated with the next commit to the affected PR, so the impact should be relatively small. Still good to leave this issue open until fixed, I guess.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
NBIS/Training-Tech-shorts#135
No description provided.