mirror of
https://github.com/fsolla/teqo.git
synced 2026-11-17 21:03:06 +00:00
Promote + POST aliases still left pt.jorgesolla.com.br off the staged deployment's GET /v13 alias list. Verify with GET /v2/.../aliases and GET /v4/aliases?domain=, log steps live, and also run `vercel alias set` (recommended when Git Integration is off).
59 lines
2 KiB
YAML
59 lines
2 KiB
YAML
# Promote a READY production deployment to custom domains (no rebuild).
|
|
# Use when `vercel deploy --prod` staged a deployment but left pt.jorgesolla.com.br
|
|
# on an older Current (Auto-assign Custom Production Domains OFF).
|
|
name: Vercel promote production
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
deployment:
|
|
description: 'Deployment URL or id (empty = latest READY production)'
|
|
required: false
|
|
type: string
|
|
default: ''
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
promote:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
env:
|
|
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
|
|
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
|
|
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- uses: actions/setup-node@v5
|
|
with:
|
|
node-version: 24
|
|
package-manager-cache: false
|
|
- name: Require Vercel credentials
|
|
run: |
|
|
set -euo pipefail
|
|
missing=()
|
|
[ -z "${VERCEL_TOKEN:-}" ] && missing+=(VERCEL_TOKEN)
|
|
[ -z "${VERCEL_ORG_ID:-}" ] && missing+=(VERCEL_ORG_ID)
|
|
[ -z "${VERCEL_PROJECT_ID:-}" ] && missing+=(VERCEL_PROJECT_ID)
|
|
if [ "${#missing[@]}" -gt 0 ]; then
|
|
echo "::error::Missing secrets: ${missing[*]}"
|
|
exit 1
|
|
fi
|
|
- name: Install Vercel CLI
|
|
run: npm install --global vercel@55
|
|
- name: Promote to custom production domain
|
|
env:
|
|
DEPLOYMENT_REF: ${{ inputs.deployment }}
|
|
run: |
|
|
set -euo pipefail
|
|
if [ -n "${DEPLOYMENT_REF:-}" ]; then
|
|
ref="$DEPLOYMENT_REF"
|
|
node scripts/vercel-ensure-production-alias.mjs "$ref"
|
|
else
|
|
node scripts/vercel-ensure-production-alias.mjs --latest
|
|
fi
|
|
# Belt-and-suspenders: CLI alias set (docs recommend this when Git Integration is off).
|
|
if [ -n "${DEPLOYMENT_REF:-}" ]; then
|
|
vercel alias set "$DEPLOYMENT_REF" pt.jorgesolla.com.br --token="$VERCEL_TOKEN" --scope="$VERCEL_ORG_ID" --yes
|
|
fi
|