Skip to content

support: external_repository seems to not support a PR-based workflow #1114

Open
@brianthelion

Description

Checklist

  • I am using the latest version of this action.
  • I have read the latest README and followed the instructions.
  • I have read the latest GitHub Actions official documentation and learned the basic spec and concepts.

Describe your question

I have succeeded in using the peaceiris/actions-gh-pages@v4 action to push a branch to an external_repository using a deploy_key as described in the docs. To achieve this, I use publish_branch: ${{ github.ref_name }}.

As a final sanity check, I would like to manually create a PR from, eg, newbranch/3@abcdef to main, where main is a protected branch that is published to the web through gh-pages.

Unfortunately, the new branch pushed by the peaceiris/actions-gh-pages@v4 action doesn't share a commit history with main because it came from a static site generator. Github refuses to allow PRs without any shared history.

The net result is that I'm unable to use a PR-based workflow on my external_repository. In fact, there doesn't appear to be a way to merge the new branch unless I do some manual git-fu.

Is my only choice is to use publish_branch: main?

Relevant links

Public repository: 
  `external_repository:` https://github.com/lonely-bike/www
YAML config: (private)
YAML workflow: (private)


      - name: Deploy to GitHub Pages
        uses: peaceiris/actions-gh-pages@v4
        with:
          # github_token: ${{ secrets.GITHUB_TOKEN }}
          deploy_key: ${{ secrets.DEPLOY_KEY }}
          external_repository: lonely-bike/www
          publish_branch: ${{ github.ref_name }}
          publish_dir: ./website/_site
          cname: lonely.bike
          commit_message: ${{ github.event.head_commit.message }}


### Relevant log output

![image](https://github.com/user-attachments/assets/6c3ab054-d7bd-4f18-9057-833fa76dad75)


### Additional context.

_No response_

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions