-
Notifications
You must be signed in to change notification settings - Fork 50
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
Add note to include deployment
as typical trigger when using this action?
#36
Comments
Perhaps this deserves some clarification. This is:
(see #40 (comment) for ℹ️ on ☝🏻)
The goal of this Action is not to update your repository contents, though you could use it that way for supported static site generator configuration file modification. 🤔 This Action's intent is to:
Your site URLs should not be changing without input from the repository owner, such as when applying a custom domain name or changing the visibility of the Pages site, so I'm not sure how valuable it would be to be able to have a workflow specifically trigger on such modifications. The correct version of the site should arguably already have been deployed at that point, unless it's newly enabled. 🤔 That said, as far as I know, you are correct that there currently are not applicable event triggers available for those scenarios as moving to deploying with GitHub Actions did change some of that event exposure. We should probably review those soon. 😕 |
Hmm I'm a little confused by those last paragraphs. Let me just provide some context of what I'm doing, so you see where I'm coming from. I'm building a website template for people who are often non-technical. The biggest pain points I discovered were 1) Because I need to do pr previews directly in GitHub, and it's not built-in yet, I'm having to use It sounds like this action is more geared toward the new "build Pages from Actions" method, where we have a workflow that (as I understand it) GitHub runs "intelligently" whenever it needs to (a change in repo content, or a user changing the Pages url in the repo settings), and thus that workflow can always be sure it's building the site with the correct In my case, I need to have a normal workflow that listens for pushes or other standard triggers, then builds the site and pushes it to the A secondary point... it sounds like you recommend always pulling the latest Pages url at build time, rather than having it statically in the repo in a Sorry for long winded discussion. In summary, I think the |
I know technically this would be a change to the starter workflows repository, but since I think it only applies when you're using this action, I've created the issue here.
One thing I was wondering about is how to make this action run whenever the
baseurl
of the GitHub Pages site changed. As far as I can tell, that would happen when 1) GitHub Pages is first enabled, 2) when the repo name changes, or 3) the custom domain field changes. It doesn't seem like there are any workflow triggers that hook into a repo's settings, but there is thedeployment
trigger, which (as I interpret it, and in my testing) runs after each time the repo's GitHub Pages is deployed (is there any other kind of "deployment"?).As such, if you're using this action to get the most up to date
baseurl
, I think you need to run it on thedeployment
trigger. Unfortunately this means that if you're making a commit based off of the change -- e.g. updatingbaseurl
in_config.yaml
-- then pages will build once, then run this action, then make the commit which will make pages build again. So you get duplicate builds, but I don't see a way around it unless GitHub adds more triggers.Anyway, maybe you could add a note about using this trigger to the readme here?
Or maybe there's a better way that I don't know of?
The text was updated successfully, but these errors were encountered: