GitHub行动部署开发分支到大师BRACNH的子D

发布于 2025-02-12 18:33:32 字数 174 浏览 0 评论 0 原文

我的github页面链接到主分支的根。我想让github诉讼从那个说明/中创建一个子文件夹,并显示我的开发分支。没有递归的头痛,这甚至可能吗? GitHub动作似乎可以使用,我已经能够使用CheckOutV3,但这意味着在我的开发分支机构上进行了更改。如何在分支之间有效复制?这只是为了使页面工作,我可能必须重新考虑我的git策略吗?

I have my github pages linked to the root of my master branch. I would like to have a github action create a subfolder off of that say dev/ and have that show my development branch. Without getting recursive headaches is this even possible? Github actions seem to work, i've been able to use checkoutv3 but that means changes are made on my development branch. How do I effectively copy between branches? This is just to get pages to work, I may have to rethink my git strategy?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

樱花细雨 2025-02-19 18:33:32

考虑到“ github页面现在使用操作默认“(8月10日),检查一个 github页面出版物的启动工作流可以使用您想要的分支直接使用您想要的分支。

您可以调整这些YML工作流量文件以引用正确的分支,而无需从一个分支复制到另一个分支。

博客文章补充说:

自成立以来,github页面已被范围范围(以及您的存储库中的一个/docs 文件夹)范围。
在目标分支机构上的个人提交将触发构建,然后进行部署,分支保护规则已成为限制部署的安全机制。

随着转向GitHub动作的转变,GitHub页面现在正在跟踪部署而不是构建。

不再需要一个源分支,并且由工作流的触发器酌情决定。
我们已经做到了这一点,因此必须在环境的上下文中进行部署(

结果,环境保护规则是限制部署的新安全机制。

Considering that "GitHub Pages now uses Actions by default" (Aug. 10), check if one of the starter workflow for GitHub Pages publication can work for you using the branch you want directly.

You can adapt those yml workflow files to reference the right branch, without having to copy from one to another.

The blog post adds:

Since inception, GitHub Pages have been scoped to a branch (and, optionally a /docs folder) in your repository.
Individual commits on the target branch would trigger builds followed by a deployment and branch protection rules have been the security mechanism for limiting deployments.

With the shift to GitHub Actions, GitHub Pages are now tracking deployments instead of builds.

A source branch is not required anymore and is at the discretion of a workflow’s triggers.
We’ve made it so a deployment must happen in the context of an environment (github-pages by default).
As a result, environment protection rules are the new security mechanism for limiting deployments.

https://i0.wp.com/user-images.githubusercontent.com/14911070/178842638-51b834d3-6c54-423e-95fa-822f734fa98a.png?ssl=1

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文