1

Is there a repo somewhere where a blogdown website is builded by github action and where the public directory is then commited to github pages ? I would like to see the .github/workflow :)

Thanks !

lrnv
  • 1,038
  • 8
  • 19
  • I don't have the answer but if you have some time, here's a list of blogs made with blogdown: https://awesome-blogdown.com/ Maybe you will find what you want by exploring their repo – bretauv Apr 06 '20 at 13:34
  • I believe `blogdown` uses Hugo, and it's my understanding that github pages support it. I believe that is why people often use Netlify to render their website. So I'm not sure that you can solely use github or github pages to build a blogdown website. But I may be wrong! – OTStats Apr 06 '20 at 13:58

1 Answers1

1

In fact, using the research functions on github yields a bunch of repo that do it :

https://github.com/search?q=blogdown+path%3A.github%2Fworkflows

So from these examples, the question is solved.

Edit : It's a private repo, but i've copied the .github/worklfows/build.yaml file into this gist : https://gist.github.com/lrnv/17f2c721f4ac30ce55ae335cb83b6639

What it does is that is compiles the blogdown that is pushed on master and deploy the public repo onto the gh-pages branches. I use it for my blog, https://actuarial.science . The secrets.GITHUB_TOKEN variable is automaticaly setted up by github itself, you have nothing to do about it.

lrnv
  • 1,038
  • 8
  • 19
  • 1
    Would be cool if you could share some more details of your solution (and whatever gotchas you discovered, e.g. storing of secrets) – dmi3kno Apr 08 '20 at 09:00