Allow simultaneously maintaining releases for 5.x and 2.x versions of Arizona Bootstrap docs via CI infrastructure.
release-branch-trigger.yml
Repository dispatches can only be run on the main branch.
Repository dispatch type of workflow that accepts the branch name, version and sha from the arizona bootstrap repository
Conditionally passes repo dispatch variables and runs version of doc building workflow depending on the branch that the arizona-bootstrap release was on.
if 2.x runs deploy-docs-for-v2-release.yml
if main runs deploy-docs-for-v5-release.yml
deploy-docs-for-v2-release.yml
Should not be run manually
Is triggered by release-branch-trigger.yml
Only pushes updates into the docs/arizona-bootstrap/docs/2.0 folder
deploy-docs-for-v5-release.yml
Should not be run manually
Is triggered by release-branch-trigger.yml
Pushes updates into the docs/arizona-bootstrap folder but excludes the docs/arizona-bootstrap/docs/2.0 folder
Alternatives considered
One repository_dispatch workflow action that switches behavior depending on the branch that triggers the workflow
Blocked by
Could possibly add the page here: https://github.com/az-digital/digital.arizona.edu/pull/41/files#diff-3b8dc37ada427fbf61674bb7a58f15eefd024fedf1d4de79410c2f110f455c53R87 Until we are ready for a 5.x release.
I this PR I add 2 new workflow files:
Renamed
What do these changes accomplish
Allow simultaneously maintaining releases for 5.x and 2.x versions of Arizona Bootstrap docs via CI infrastructure.
release-branch-trigger.yml
Repository dispatches can only be run on the main branch. Repository dispatch type of workflow that accepts the branch name, version and sha from the arizona bootstrap repository Conditionally passes repo dispatch variables and runs version of doc building workflow depending on the branch that the arizona-bootstrap release was on.
if
2.x
runs deploy-docs-for-v2-release.yml ifmain
runs deploy-docs-for-v5-release.ymldeploy-docs-for-v2-release.yml
Should not be run manually Is triggered by release-branch-trigger.yml Only pushes updates into the
docs/arizona-bootstrap/docs/2.0
folderdeploy-docs-for-v5-release.yml
Should not be run manually Is triggered by release-branch-trigger.yml Pushes updates into the docs/arizona-bootstrap folder but excludes the
docs/arizona-bootstrap/docs/2.0
folderAlternatives considered
One repository_dispatch workflow action that switches behavior depending on the branch that triggers the workflow
How to test
Create 2 releases on https://github.com/trackleft/arizona-bootstrap/actions/workflows/release.yml From the
main
branch, create a 5.x release From the2.x
branch, create a 2.x release