R blogdown : deploy with github actions on gh-pages

南笙酒味 提交于 2021-01-28 19:18:01

问题


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 !


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



来源:https://stackoverflow.com/questions/61060920/r-blogdown-deploy-with-github-actions-on-gh-pages

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!