Combine the three workflows into one - #8
Merged
Conversation
One file, two jobs. Everything is validated on pull requests and pushes to main; rendering, publishing and committing happen only on main. The `if` on the publish job is load-bearing rather than tidiness. A pull request from a branch in this repository gets whatever permissions the workflow asks for, so without it every such branch would deploy the site and hold a write token. Fork pull requests are stopped separately, by GitHub forcing their token read-only. Deploying in the same job as the render fixes the site trailing by one push: Pages used to publish the tree at the triggering commit, and the corrected graph.js was committed after that. Dropping the path filter fixes a quieter one. Both renderers import validate_solution.py, which was not in the old trigger list, so a change to it could alter graph.js with nothing re-rendering.
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.
One file, two jobs. Everything is validated on pull requests and pushes to main; rendering, publishing and committing happen only on main.
The
ifon the publish job is load-bearing rather than tidiness. A pull request from a branch in this repository gets whatever permissions the workflow asks for, so without it every such branch would deploy the site and hold a write token. Fork pull requests are stopped separately, by GitHub forcing their token read-only.Deploying in the same job as the render fixes the site trailing by one push: Pages used to publish the tree at the triggering commit, and the corrected graph.js was committed after that.
Dropping the path filter fixes a quieter one. Both renderers import validate_solution.py, which was not in the old trigger list, so a change to it could alter graph.js with nothing re-rendering.