az-digital / digital.arizona.edu

digital.arizona.edu
https://digital.arizona.edu/
1 stars 1 forks source link

Closes #40, Closes #38 Allow simultaneously maintaining releases for 5.x and 2.x versions of Arizona Bootstrap docs via CI infrastructure. #41

Closed trackleft closed 1 year ago

trackleft commented 1 year ago

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 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

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 the 2.x branch, create a 2.x release