Unless there's something I'm not thinking, it's probably good to fail out and not deploy...
But also, this will mean that if someone submits a failing PR, it will start failing on mainline too, and other PRs won't get updated...
So this might require some thought, due to the weirdness of this process, in that the storybook addon manipulates git and checks out feature branches whether run on mainline or on a PR. 🤔
What we ACTUALLY want is (for example, with PR-18), for a CI error to throw (and a deploy not the happen on that PR) ONLY when the build error occurs during the PR-18 part of the build. But if the build error happens when on mainline or in another PR, then we continue along. In this case, the only result of the build error is that https://civictechto.github.io/polis-storybook/PR-18/ won't exist in the deploy.
We could probably accomplish this by adding a check (after the build) for a "PR-18" folder, when in that PR's build process, and if it doesn't exist, assume an error and fail that whole CI build (creating a commit status failure in the PR, and also aborting the github pages deploy)
Re-ticketed from: https://github.com/CivicTechTO/polis-storybook/pull/18#issuecomment-2427059863
Seems that the storybook build process doesn't show a failure when one of the PR build processes fails. E.g., https://github.com/CivicTechTO/polis-storybook/actions/runs/11433350904/job/31805190108?pr=18#step:3:1025
Unless there's something I'm not thinking, it's probably good to fail out and not deploy...
But also, this will mean that if someone submits a failing PR, it will start failing on mainline too, and other PRs won't get updated...
So this might require some thought, due to the weirdness of this process, in that the storybook addon manipulates git and checks out feature branches whether run on mainline or on a PR. 🤔
What we ACTUALLY want is (for example, with PR-18), for a CI error to throw (and a deploy not the happen on that PR) ONLY when the build error occurs during the PR-18 part of the build. But if the build error happens when on mainline or in another PR, then we continue along. In this case, the only result of the build error is that https://civictechto.github.io/polis-storybook/PR-18/ won't exist in the deploy.
We could probably accomplish this by adding a check (after the build) for a "PR-18" folder, when in that PR's build process, and if it doesn't exist, assume an error and fail that whole CI build (creating a commit status failure in the PR, and also aborting the github pages deploy)