authorgravatar for me@t3.ggTheo Browne <me@t3.gg> 2026-09-06 18:32:21-07:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-09-06 18:32:21-07:00
log0860cea0c25f34582d03f17ccde23c5dfec64c12
treeebb6fb9de0d49ac364b34cd5ade07bb95f32e07a
parent95f9b14f873c7b119f0ffb6dbd194c7063293aa2
signature Signed by PGP key B5690EEEBB952194

fix(marketing): deploy site with nightly releases (#10443)


2 files changed, 66 insertions(+), 1 deletions(-)

.github/workflows/release.yml+54
......@@ -1057,6 +1057,60 @@ jobs:
10571057 "${vercel_scope_args[@]}"
10581058 fi
10591059
1060 deploy_marketing:
1061 name: Deploy marketing site
1062 needs: [preflight, release]
1063 if: ${{ !failure() && !cancelled() && needs.preflight.result == 'success' && needs.release.result == 'success' && needs.preflight.outputs.release_channel == 'nightly' }}
1064 runs-on: blacksmith-8vcpu-ubuntu-2404
1065 timeout-minutes: 10
1066 env:
1067 VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
1068 VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
1069 VERCEL_TEAM_SLUG: ${{ vars.VERCEL_TEAM_SLUG }}
1070 steps:
1071 - name: Checkout
1072 uses: actions/checkout@v6
1073 with:
1074 ref: ${{ needs.preflight.outputs.ref }}
1075 sparse-checkout: |
1076 /*
1077 !/.repos/
1078 sparse-checkout-cone-mode: false
1079
1080 - name: Setup Vite+
1081 uses: voidzero-dev/setup-vp@v1
1082 with:
1083 node-version-file: package.json
1084 cache: true
1085 run-install: |
1086 args:
1087 - --filter=@t3tools/marketing...
1088
1089 - name: Deploy marketing site to Vercel
1090 shell: bash
1091 run: |
1092 set -euo pipefail
1093
1094 if [[ -z "${VERCEL_TOKEN:-}" || -z "${VERCEL_ORG_ID:-}" ]]; then
1095 echo "Missing one or more required Vercel secrets: VERCEL_TOKEN, VERCEL_ORG_ID." >&2
1096 exit 1
1097 fi
1098
1099 VERCEL_PROJECT_ID="$(
1100 curl --fail --silent --show-error \
1101 --header "Authorization: Bearer $VERCEL_TOKEN" \
1102 "https://api.vercel.com/v9/projects/t3code-marketing?teamId=$VERCEL_ORG_ID" \
1103 | jq --exit-status --raw-output '.id'
1104 )"
1105 export VERCEL_PROJECT_ID
1106
1107 vp dlx vercel@53.1.1 deploy \
1108 --archive=tgz \
1109 --prod \
1110 --yes \
1111 --token "$VERCEL_TOKEN" \
1112 --scope "${VERCEL_TEAM_SLUG:-$VERCEL_ORG_ID}"
1113
10601114 finalize:
10611115 name: Finalize release
10621116 if: ${{ !failure() && !cancelled() && needs.preflight.result == 'success' && needs.release.result == 'success' && needs.preflight.outputs.release_channel == 'stable' }}
docs/operations/release.md+12-1
......@@ -111,6 +111,17 @@ Developers deploy personal stages locally rather than through pull-request autom
111111vp run --filter t3code-relay deploy -- --stage "$USER" --env-file .env.local
112112```
113113
114## Marketing site deployment
115
116After a nightly release is published, the release workflow deploys the same commit
117to the marketing site's Vercel production project. Stable releases do not deploy
118the marketing site because they can promote an older nightly commit.
119
120The job looks up the `t3code-marketing` project using the existing `VERCEL_TOKEN`
121and `VERCEL_ORG_ID` secrets. It also respects the optional `VERCEL_TEAM_SLUG`
122variable. The Vercel project's root directory must be `apps/marketing`.
123Git deployments remain disabled in `apps/marketing/vercel.ts`.
124
114125## Hosted web app release deployment
115126
116127The hosted app is intentionally not deployed by Vercel's Git integration. The
......@@ -297,7 +308,7 @@ to validate the workflow.
297308The workflow has no non-publishing `workflow_dispatch` mode. Use normal CI or local quality gates to
298309validate checks and builds without shipping. To exercise the complete release graph at lower stable
299310risk, manually dispatch `channel=nightly`; this still publishes a real nightly npm package, GitHub
300prerelease, desktop updater release, and hosted nightly alias, but it does not update stable aliases or
311prerelease, desktop updater release, hosted nightly alias, and marketing site, but it does not update stable app aliases or
301312commit a version bump to `main`. Only run it when a real nightly release is acceptable.
302313
303314Manual `channel=stable` is also a real stable-channel release. Omitting signing secrets only makes