| author | |
| committer | |
| log | 0860cea0c25f34582d03f17ccde23c5dfec64c12 |
| tree | ebb6fb9de0d49ac364b34cd5ade07bb95f32e07a |
| parent | 95f9b14f873c7b119f0ffb6dbd194c7063293aa2 |
| signature | Signed by PGP key B5690EEEBB952194 |
2 files changed, 66 insertions(+), 1 deletions(-)
.github/workflows/release.yml+54| ... | @@ -1057,6 +1057,60 @@ jobs: | ... | @@ -1057,6 +1057,60 @@ jobs: |
| 1057 | "${vercel_scope_args[@]}" | 1057 | "${vercel_scope_args[@]}" |
| 1058 | fi | 1058 | fi |
| 1059 | 1059 | ||
| 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 | |||
| 1060 | finalize: | 1114 | finalize: |
| 1061 | name: Finalize release | 1115 | name: Finalize release |
| 1062 | if: ${{ !failure() && !cancelled() && needs.preflight.result == 'success' && needs.release.result == 'success' && needs.preflight.outputs.release_channel == 'stable' }} | 1116 | 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 | ... | @@ -111,6 +111,17 @@ Developers deploy personal stages locally rather than through pull-request autom |
| 111 | vp run --filter t3code-relay deploy -- --stage "$USER" --env-file .env.local | 111 | vp run --filter t3code-relay deploy -- --stage "$USER" --env-file .env.local |
| 112 | ``` | 112 | ``` |
| 113 | 113 | ||
| 114 | ## Marketing site deployment | ||
| 115 | |||
| 116 | After a nightly release is published, the release workflow deploys the same commit | ||
| 117 | to the marketing site's Vercel production project. Stable releases do not deploy | ||
| 118 | the marketing site because they can promote an older nightly commit. | ||
| 119 | |||
| 120 | The job looks up the `t3code-marketing` project using the existing `VERCEL_TOKEN` | ||
| 121 | and `VERCEL_ORG_ID` secrets. It also respects the optional `VERCEL_TEAM_SLUG` | ||
| 122 | variable. The Vercel project's root directory must be `apps/marketing`. | ||
| 123 | Git deployments remain disabled in `apps/marketing/vercel.ts`. | ||
| 124 | |||
| 114 | ## Hosted web app release deployment | 125 | ## Hosted web app release deployment |
| 115 | 126 | ||
| 116 | The hosted app is intentionally not deployed by Vercel's Git integration. The | 127 | The hosted app is intentionally not deployed by Vercel's Git integration. The |
| ... | @@ -297,7 +308,7 @@ to validate the workflow. | ... | @@ -297,7 +308,7 @@ to validate the workflow. |
| 297 | The workflow has no non-publishing `workflow_dispatch` mode. Use normal CI or local quality gates to | 308 | The workflow has no non-publishing `workflow_dispatch` mode. Use normal CI or local quality gates to |
| 298 | validate checks and builds without shipping. To exercise the complete release graph at lower stable | 309 | validate checks and builds without shipping. To exercise the complete release graph at lower stable |
| 299 | risk, manually dispatch `channel=nightly`; this still publishes a real nightly npm package, GitHub | 310 | risk, manually dispatch `channel=nightly`; this still publishes a real nightly npm package, GitHub |
| 300 | prerelease, desktop updater release, and hosted nightly alias, but it does not update stable aliases or | 311 | prerelease, desktop updater release, hosted nightly alias, and marketing site, but it does not update stable app aliases or |
| 301 | commit a version bump to `main`. Only run it when a real nightly release is acceptable. | 312 | commit a version bump to `main`. Only run it when a real nightly release is acceptable. |
| 302 | 313 | ||
| 303 | Manual `channel=stable` is also a real stable-channel release. Omitting signing secrets only makes | 314 | Manual `channel=stable` is also a real stable-channel release. Omitting signing secrets only makes |