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?
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.
© 2022 - 2024 — McMap. All rights reserved.
git push
to send new commits from the new clone back to the original. Note that this will often require a non-single-branch, less-shallow (or perhaps even full) clone. – Anyplace