R Blogdown:在gh-pages上使用github动作进行部署 [英] R blogdown : deploy with github actions on gh-pages
问题描述
是否存在通过 github action
构建 blogdown
网站的仓库,然后将 public
目录提交到github页面?我想看 .github/workflow
:)
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
:)
谢谢!
推荐答案
事实上,在github上使用研究功能会产生大量的回购代码:
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.
这是一个私人仓库,但我已将 .github/worklfows/build.yaml
文件复制到此要点中:
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
它的作用是编译被推送到 master
上的blogdown,并将 public
回购部署到 gh-pages
分支上.我将其用于我的博客 https://actuarial.science . secrets.GITHUB_TOKEN
变量是由github本身自动设置的,与它无关.
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.
这篇关于R Blogdown:在gh-pages上使用github动作进行部署的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!