ai-blog
ai-blog copied to clipboard
Only trigger deploy to Netlify from main branch
The Netlify step appears to run on every change, regardless of branch, resulting in no-op deployments in Netlify.
Should it have if: github.ref == 'refs/heads/main'
as a guard clause like the GitHub deploy?
https://github.com/rstudio/ai-blog/blob/main/.github/workflows/main.yml#L93
Hi Josh,
no, it shouldn't result in no-op deployments ... for every preview triggered, I got notified about deployment locations that look like this:
https://6262b882578849340255bc1c--hardcore-kirch-782335.netlify.app/
For us, it is important to be able to preview posts after individual changes have been made, so we can see if something breaks the layout, a picture renders nicely, etc.
Of course, the posts are written offline at first, but before deployment, some changes will have to be made (for example, due to review comments).
harcore-kirch isn't an rstudio Netlify site. What I am referring to is the triggering of a Netlify build of reverent-jones-333de8, which is the meta-blog site. Those are no ops because it only builds main.
Should hardcore-kirch be transferred to the rstudio Netlify team?
That sounds great, thank you very much! Honestly I don't even have access - Netlify was managed by Javier before he left ... If the RStudio team could take care of it that'd be awesome ...