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

This commit is contained in:
Theo Browne authored and GitHub committed 2026-09-06 18:32:21 -07:00
1 parent 95f9b14f87
commit 0860cea0c2
2 files changed
+66 -1

No files matched your search

+54
View File
@@ -1057,6 +1057,60 @@ jobs:
"${vercel_scope_args[@]}"
fi
deploy_marketing:
name: Deploy marketing site
needs: [preflight, release]
if: ${{ !failure() && !cancelled() && needs.preflight.result == 'success' && needs.release.result == 'success' && needs.preflight.outputs.release_channel == 'nightly' }}
runs-on: blacksmith-8vcpu-ubuntu-2404
timeout-minutes: 10
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_TEAM_SLUG: ${{ vars.VERCEL_TEAM_SLUG }}
steps:
- name: Checkout
uses: actions/checkout@v6
with:
ref: ${{ needs.preflight.outputs.ref }}
sparse-checkout: |
/*
!/.repos/
sparse-checkout-cone-mode: false
- name: Setup Vite+
uses: voidzero-dev/setup-vp@v1
with:
node-version-file: package.json
cache: true
run-install: |
args:
- --filter=@t3tools/marketing...
- name: Deploy marketing site to Vercel
shell: bash
run: |
set -euo pipefail
if [[ -z "${VERCEL_TOKEN:-}" || -z "${VERCEL_ORG_ID:-}" ]]; then
echo "Missing one or more required Vercel secrets: VERCEL_TOKEN, VERCEL_ORG_ID." >&2
exit 1
fi
VERCEL_PROJECT_ID="$(
curl --fail --silent --show-error \
--header "Authorization: Bearer $VERCEL_TOKEN" \
"https://api.vercel.com/v9/projects/t3code-marketing?teamId=$VERCEL_ORG_ID" \
| jq --exit-status --raw-output '.id'
)"
export VERCEL_PROJECT_ID
vp dlx [email protected] deploy \
--archive=tgz \
--prod \
--yes \
--token "$VERCEL_TOKEN" \
--scope "${VERCEL_TEAM_SLUG:-$VERCEL_ORG_ID}"
finalize:
name: Finalize release
if: ${{ !failure() && !cancelled() && needs.preflight.result == 'success' && needs.release.result == 'success' && needs.preflight.outputs.release_channel == 'stable' }}
+12 -1
View File
@@ -111,6 +111,17 @@ Developers deploy personal stages locally rather than through pull-request autom
vp run --filter t3code-relay deploy -- --stage "$USER" --env-file .env.local
```
## Marketing site deployment
After a nightly release is published, the release workflow deploys the same commit
to the marketing site's Vercel production project. Stable releases do not deploy
the marketing site because they can promote an older nightly commit.
The job looks up the `t3code-marketing` project using the existing `VERCEL_TOKEN`
and `VERCEL_ORG_ID` secrets. It also respects the optional `VERCEL_TEAM_SLUG`
variable. The Vercel project's root directory must be `apps/marketing`.
Git deployments remain disabled in `apps/marketing/vercel.ts`.
## Hosted web app release deployment
The hosted app is intentionally not deployed by Vercel's Git integration. The
@@ -297,7 +308,7 @@ to validate the workflow.
The workflow has no non-publishing `workflow_dispatch` mode. Use normal CI or local quality gates to
validate checks and builds without shipping. To exercise the complete release graph at lower stable
risk, manually dispatch `channel=nightly`; this still publishes a real nightly npm package, GitHub
prerelease, desktop updater release, and hosted nightly alias, but it does not update stable aliases or
prerelease, desktop updater release, hosted nightly alias, and marketing site, but it does not update stable app aliases or
commit a version bump to `main`. Only run it when a real nightly release is acceptable.
Manual `channel=stable` is also a real stable-channel release. Omitting signing secrets only makes