Skip to content
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

feat: allow to specify a different repository to deploy to #38

Merged

Conversation

MH4GF
Copy link
Contributor

@MH4GF MH4GF commented Apr 14, 2023

Resolves #41

Description

Thank you for creating this fantastic action!
I've added a feature to deploy previews to GitHub Pages of another repository. The following inputs have been added:

  • deploy-repository ... Specify the repository name to deploy. This is an input that can be passed to JamesIves/github-pages-deploy-action. The default is github.repository.
  • token ... The default GITHUB_TOKEN does not have enough permissions since it will be pushing to another repository. Therefore, the ability to pass a token is added.

These inputs are passed to JamesIves/github-pages-deploy-action.

Also, the pagesurl can be changed to the repository to deploy to.

Motivation

On the site I manage, I deploy to GitHub Pages using the beta version of GitHub Actions.
As a result, I'm facing the same problem as in this issue: #21, and I would like to deploy the preview environment to another repository as a workaround.

Verification

I have prepared the following two repositories and verified the operation:

@rossjrw
Copy link
Owner

rossjrw commented Apr 23, 2023

Looks good to me! I've made some documentation changes. Thanks for the contribution @MH4GF!

@rossjrw rossjrw merged commit 0223615 into rossjrw:main Apr 23, 2023
@rossjrw
Copy link
Owner

rossjrw commented Apr 23, 2023

@MH4GF MH4GF deleted the allow-specify-different-repository-to-deployment branch April 25, 2023 01:13
@aspiers aspiers mentioned this pull request Apr 14, 2024
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Please allow passing the token
2 participants