Help with quarto-action (CI) on Branching/Pull Requests without overwriting the main GitHub Pages #3027
Replies: 2 comments 5 replies
-
For R Lille (R User Group in Lille, France), I am using Netlify preview build on PR, but the idea for GitHub Pages would be the same without the preview. For instance, I just triggered the action resulting in the following: |
Beta Was this translation helpful? Give feedback.
-
It's a couple of years late, but hopefully this will help someone else: you can use https://github.com/marketplace/actions/deploy-pr-preview . Apart from setting up the preview, you need to change the main gh-pages workflow from quarto-dev/quarto-actions/publish to quarto-dev/quarto-actions/render, because the publish action force pushes the results to the gh-pages branch, wiping out any PR previews. Instead, you can deploy using
You can find a full example at https://github.com/gofair-foundation/gofair-wiki/tree/b09b6ddca82d9126522294710cd7aca8ebcb8326/.github/workflows . |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
As a software developer, I'm used to branching when an important change is made to the project (rather than modifying the main branch). The CI Action in this case serves as a way to validate the changes before they go "live".
However, with my current action setup at https://github.com/fuhrmanator/log210-ndc-quarto/blob/main/.github/workflows/quarto-render-publish.yml when I create a Pull Request, the GitHub pages ("live result") is overwritten.
I'm assuming there is there a way to put the "branch" in the path of the published results (so the "main" result sent to GitHub pages isn't overwritten)?
Beta Was this translation helpful? Give feedback.
All reactions