如何强制GitHub Pages构建? [英] How to force GitHub Pages build?

查看:45
本文介绍了如何强制GitHub Pages构建?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每个GitHub存储库都可以拥有( GitHub Pages 网站,可以用Jekyll建造.每次您推送新提交时,GitHub都会构建站点.
有没有办法在不推动新提交的情况下强制刷新Github Pages网站?

Every GitHub repository can have (or be) a GitHub Pages website, that can be built with Jekyll. GitHub builds the site every time you push a new commit.
Is there a way to force the refresh of the Github Pages website without pushing a new commit?

推荐答案

来自GitHub支持,2014年6月7日:

From GitHub support, 2014-06-07:

当前无法在不将提交推送到适当分支的情况下手动触发重建.

It's not currently possible to manually trigger a rebuild, without pushing a commit to the appropriate branch.


正如Andy在评论中指出的那样,您可以使用以下命令来推送空提交:


As Andy pointed out in the comments, you can push an empty commit with the command:

git commit -m 'rebuild pages' --allow-empty
git push origin <branch-name>

感谢GitHub Actions,触发每日发布相当容易: https://stackoverflow.com/a/61706020/4548500 .

这篇关于如何强制GitHub Pages构建?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆