History

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

Theo Browne committed 2 months ago

Commit 0860cea1 parent 95f9b142 files · +66 −1Browse files

Showing the changes to .github (1 of 2 files). Show all

Unified · Split

.github/workflows/release.yml+54−0
@@ -1057,6 +1057,60 @@ jobs: · 1056 unmodified lines
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' }}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t