-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gh-pages branch protection rules in conflict with PR merge rules #21
Comments
Yes, it seems like maybe I didn't need to create one for |
When we figure this out, we should also update the guide on this topic. |
It seems like the API key automatically made available within GitHub Actions doesn't count as a deploy key. It could be that we could create a deploy key and then add it as a secret to the environment for the GitHub Action. However, that also sounds to me like adding one security risk to circumvent another security tie-down. |
I think another option would be to use the repo admin override (since it did show me as deploying). I don't recall us having this issue with classic branch protections (we still have access to those, so that could be another option). I asked @wang2989 to look into this. |
Discussing more today, we may not have had this issue with the classic branch protections because those @wang2989 is going to summarize the options discussed with some resources. |
General InfoSummary of Issue: Current Ci/CD workflow involves pushing new commits to main via pull requests which then trigger a GitHub actions workflow and then builds an updated MKDocs site, pushing that to the gh-pages branch. GitHub pages is set to publish off the gh-pages branch. PRs made this way will fail during the push to the gh-pages branch as GitHub will flag that commits made this way are not through a PR (which is defined in the branch rulesets). Main Focus of Solutions: Finding a way to allow pull requests to deploy to main without triggering/violating the GitHub rule set protecting the gh-pages branch. SolutionsOption 1: Create a GitHub App and allow it to bypass the branch protection
Option 2: Bypass branch protection using deploy key
Option 3: Configure deployment workflow to use an admin-privilege bot account that is set to bypass branch protection
Additional Options (Requires more work / Not as seamless):
|
The
gh-pages
branch is under a branch protection rule that requires changes to come through a PR. I don't know whether this had been active for some time, but the most recent PR merge (#15), which must have used a squash merge, wasn't honored as satisfying the branch protection rule, resulting in a build failure.I suspect that this
gh-pages
branch protection rule is a problem if allowing squash and rebase merges, but maybe this needs to be investigated.I've for this time bypassed the issue by disabling the branch protection, re-triggering the previously failed Github Action, and then re-enabling branch protection.
The text was updated successfully, but these errors were encountered: