fix: stop the release from resetting the docs branch and losing hand-written pages

This commit is contained in:
LukeGus
2026-08-19 15:54:06 -05:00
parent 8af4cbdec4
commit d6e8ee4784
+10 -3
View File
@@ -443,7 +443,14 @@ jobs:
- name: Create docs release branch
working-directory: docs-repo
run: git checkout -B "dev-${{ needs.prep.outputs.version }}"
run: |
BRANCH="dev-${{ needs.prep.outputs.version }}"
if git ls-remote --exit-code origin "refs/heads/$BRANCH" >/dev/null 2>&1; then
echo "Reusing existing docs branch $BRANCH."
git checkout -B "$BRANCH" "origin/$BRANCH"
else
git checkout -B "$BRANCH"
fi
- name: Overwrite OpenAPI spec and regenerate API docs
working-directory: docs-repo
@@ -472,7 +479,7 @@ jobs:
git add -A
git commit -m "feat: update API docs for ${{ needs.prep.outputs.version }}"
git push --force origin "dev-${{ needs.prep.outputs.version }}"
git push origin "dev-${{ needs.prep.outputs.version }}"
- name: Open and squash-merge docs PR
if: ${{ inputs.mode != 'Dry run' }}
@@ -535,7 +542,7 @@ jobs:
docs,
publish-youtube,
]
if: ${{ always() && (inputs.mode == 'Everything' || inputs.mode == 'Skip submit') && needs.merge-to-main.result == 'success' && needs.electron-release.result == 'success' }}
if: ${{ always() && (inputs.mode == 'Everything' || inputs.mode == 'Skip submit') && needs.merge-to-main.result == 'success' && needs.docs.result == 'success' }}
runs-on: blacksmith-2vcpu-ubuntu-2404
steps:
- name: Checkout repository