question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Prohibited branch detection does not work

See original GitHub issue

Describe the bug

When users set a publish_branch that is the same as a branch triggered by the workflow, this action stops the deployment to protect the branch.

https://github.com/peaceiris/actions-gh-pages/blob/e3404eb04b31f2987120c926fea07b0213caebd8/src/set-tokens.ts#L76-L81

Currently, this protection behavior does not work.

To Reproduce

With peaceiris/actions-gh-pages@v3

on:
  push:
    branches:
      - master
...
          publish_branch: master

Expected behavior This Action should return the error You deploy from master to master

Screenshots Screen Shot 2020-04-23 at 13 06 22

Your YAML file

Additional context I found this bug in this article: AsciidocのドキュメントをGitHub Actionsを用いてGitHub Pagesで公開する。 - Qiita

This protection should be also implemented for personal_token, deploy_key, and eventName === 'pull_request'.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
abedurftigcommented, May 28, 2020

@peaceiris, thanks for following up. I see my mistake. I think the README is clear now.

0reactions
github-actions[bot]commented, Jun 25, 2021

This issue has been LOCKED because of it being resolved!

The issue has been fixed and is therefore considered resolved. If you still encounter this or it has changed, open a new issue instead of responding to solved ones.

<div align="right">Log | Bot Usage</div>
Read more comments on GitHub >

github_iconTop Results From Across the Web

Protected branches - GitLab Docs
No one can delete a protected branch using Git commands, however, ... For merge controls to work properly, set Allowed to push to...
Read more >
remote: GitLab: You are not allowed to push code to protected ...
You can turn on and off protection on selected branches in Project Settings (Go to project: "Settings" -> "Repository" -> "Expand" on "Protected...
Read more >
Part A. Requirements for all Mortgagees - HUD
This constitutes a prohibited branch arrangement. Separate entities may not operate as “branches” or “DBAs” of a FHA approved mortgagee.
Read more >
Fair Lending Laws and Regulations - FDIC
laws, a lender may not, because of a prohibited factor: ... In order to detect any disparate ... and such issues as branch...
Read more >
TSA Has Policies that Prohibit Unlawful Profiling But Should ...
Screeners are prohibited from picking passengers based on factors ... These complaints are not specific to behavior detection activities.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found