问题
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