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.

Support for publish_branch that is the same as the triggering branch?

See original GitHub issue

Currently, we’re getting the following error for this CI config:

Setup auth token
  [INFO] setup GITHUB_TOKEN
  ##[error]Action failed with "You deploy from PMLB2.0 to PMLB2.0"

From https://github.com/peaceiris/actions-gh-pages/issues/245, it sounds like this is the intended behavior to:

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.

In our case, we use CI to regenerate some files. The use case is similar to linting. Imagine CI is used to lint files that should be committed back to the same branch.

What are the reasons that publishing to the triggering branch is forbidden? Is there a workaround?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
peaceiriscommented, Jun 21, 2020

That is the goal. When CI changes a file, we want that change to be pushed back to the triggering branch.

This action does not support this use case.

I just recommend you to use git commands.

- name: update
  run: |
    git add .
    git commit -m "update"
    git push origin YOUR_BRANCH
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

Setting up a publish branch with merging or pull requests
Adding a publish branch​​ Go to Site Settings / Publishing and click Add Publish Branch. Select the branch you want to merge into...
Read more >
I want Azure Pipeline to build equally named branch as the ...
Is it possible to let a pipeline-resource trigger the B-CI pipeline to build the branch with the same name as the branch which...
Read more >
Azure Data Factory – All about publish branch adf_publish
adf_publish – this branch is specific to Azure Data Factory which gets created automatically by the Azure Data Factory service. The adf-publish ...
Read more >
Events that trigger workflows - GitHub Docs
Runs your workflow when someone pushes to a branch that is the publishing source for GitHub Pages, if GitHub Pages is enabled for...
Read more >
Building multiple branches - Azure Pipelines | Microsoft Learn
A common workflow with Git is to create temporary branches from your main branch. These branches are called topic or feature branches and...
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