Auto-deploy GitHub Pages on push to main - #3
Merged
Conversation
Previously the deploy workflow only ran on workflow_dispatch (manual trigger from the Actions tab). Adding 'push: branches: [main]' so merges to main automatically rebuild the live site. The workflow_dispatch trigger is kept as a fallback for manual re-runs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The deploy workflow was previously
workflow_dispatchonly — meaning merging tomaindid not rebuild the live site. You had to remember to manually click "Run workflow" in the Actions tab after every merge.This adds a
push: branches: [main]trigger so that any merge tomainautomatically redeployspauseai.uk.The existing
workflow_dispatchtrigger is kept, so the manual re-run button still works as a fallback (useful if a deploy ever needs to be retried without a new commit).Why this PR exists
Discovered this when PR #2 was merged but
pauseai.uk/donate/returned a redirect to/— the new files were onmainbut the site hadn't been rebuilt.After merging
This PR's own merge will trigger the new behaviour, so it should redeploy itself and bring
/donate/live in the same run.Generated by Claude Code