shalzz / zola-deploy-action

Github action for building a Zola site and deploying to Github Pages

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow for enterprise URL support

kathleenfrench opened this issue · comments

Currently, if this action runs on a self-hosted Github instance that has a different hostname than github.com, the deployment will fail given the following line in entrypoint.sh

remote_repo="https://${GITHUB_TOKEN}@github.com/${TARGET_REPOSITORY}.git"

Would you be open to a PR adding the hostname as a parameter on the action so it can be compatible w/ self-hosted/enterprise environments. Something like:

remote_repo="https://${GITHUB_TOKEN}@${GITHUB_HOSTNAME}/${TARGET_REPOSITORY}.git"

Happy to do it if this sounds of interest!

Hi,

Yeah this seems like a valid addition.
Is the GITHUB_HOSTNAME automatically set by the github runner for every job run and defaults to "github.com"? If not please set the default in the script manually if the variable is not being overridden, if your planning to create a PR.