rstudio / ai-blog

Repository for the RStudio AI Blog (formerly: TensorFlow for R Blog)
https://blogs.rstudio.com/ai/
48 stars 36 forks source link

Only trigger deploy to Netlify from main branch #179

Open jspiewak opened 2 years ago

jspiewak commented 2 years ago

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

skeydan commented 2 years ago

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).

jspiewak commented 2 years ago

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.

jspiewak commented 2 years ago

Should hardcore-kirch be transferred to the rstudio Netlify team?

skeydan commented 2 years ago

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 ...