Fixing on the fly notebook execution filter #559
Merged
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.
Internal Notes for Reviewers
I THINK I finally refined it to the point where it will work. Some of the issue was the previous set-up defaults to always checking against
mainbecause that is the behaviour of how${{ github.head_ref }}works:merge-x-into-...workflows it ignored the input)main) even if you specify a differentbasevalidate-docs-site.yaml
Now this checks the current PR against the branch you're intending to merge into (so it will in theory also work when we preview the site for pushes to
prodand not just working PRs pre-mainmerge 🤞🏻):deploy-docs-staging.yaml & deploy-docs-prod.yaml
Other than the
on.push.branchesfilter at the top of each workflow, these are now the same:We are now checking for changes against the PREVIOUS commit prior to the push that triggered the workflow. HOPEFULLY??? this is the final solution??? Allegedly
${{ github.sha }}is available to push workflows so that should solve our issue.Expected behaviour
PR >
mainsite/notebooks/**has a change pushed up to the PR, it will trigger the notebook execution: SUCCESSFUL WORKFLOW RUNmain>stagingmain, the workflow merging intostagingfrommainwill trigger the notebook execution:staging>prodprod, the workflow merging intostagingfromprodwill trigger the notebook execution: