From 342580531ccb6f3ccd78f94e70672e8df3a16840 Mon Sep 17 00:00:00 2001 From: Ben Kunkle Date: Mon, 18 May 2026 10:35:35 -0500 Subject: [PATCH] script: Trigger docs release (#56953) Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Closes #ISSUE Release Notes: - N/A or Added/Fixed/Improved ... --- script/trigger-docs-build | 50 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100755 script/trigger-docs-build diff --git a/script/trigger-docs-build b/script/trigger-docs-build new file mode 100755 index 00000000000..3d429e0097d --- /dev/null +++ b/script/trigger-docs-build @@ -0,0 +1,50 @@ +#!/usr/bin/env bash +set -euo pipefail + +which gh >/dev/null || brew install gh + +case "${1:-}" in + preview | stable) + channel="$1" + ;; + *) + echo "Usage: $0 preview|stable [--from-main]" >&2 + exit 1 + ;; +esac + +case "${2:-}" in + "") + from_main=false + ;; + --from-main) + from_main=true + ;; + *) + echo "Usage: $0 preview|stable [--from-main]" >&2 + exit 1 + ;; +esac + +version=$(./script/get-released-version "$channel") +branch=$(echo "$version" | sed -E 's/^([0-9]+)\.([0-9]+)\.[0-9]+$/v\1.\2.x/') +workflow_ref="$branch" +if [ "$from_main" = true ]; then + workflow_ref="main" +fi + +echo "Triggering docs build for $channel ($branch) using workflow from $workflow_ref" +echo "This will publish docs from $branch before the next release." +echo "Only continue if $branch has no unreleased feature-specific docs." +read -r -p "Continue? [y/N] " confirmation +case "$confirmation" in + y | Y | yes | YES) + ;; + *) + echo "Cancelled." + exit 1 + ;; +esac + +gh workflow run "deploy_docs.yml" --ref "$workflow_ref" -f channel="$channel" -f checkout_ref="$branch" +echo "Follow along at: https://github.com/zed-industries/zed/actions/workflows/deploy_docs.yml"