Some checks failed
Test examples / Test Examples (20) (push) Has been cancelled
Test examples / Test Examples (22) (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
Trigger Release / start (push) Has been cancelled
Stale issue handler / stale (push) Has been cancelled
Update Font Data / create-pull-request (push) Has been cancelled
build-and-deploy / deploy-target (push) Has been cancelled
build-and-deploy / build (push) Has been cancelled
build-and-deploy / stable - aarch64-unknown-linux-musl - node@16 (push) Has been cancelled
build-and-deploy / stable - x86_64-unknown-linux-musl - node@16 (push) Has been cancelled
build-and-deploy / stable - aarch64-unknown-linux-gnu - node@16 (push) Has been cancelled
build-and-deploy / stable - x86_64-unknown-linux-gnu - node@16 (push) Has been cancelled
build-and-deploy / stable - aarch64-pc-windows-msvc - node@16 (push) Has been cancelled
build-and-deploy / stable - x86_64-pc-windows-msvc - node@16 (push) Has been cancelled
build-and-deploy / stable - aarch64-apple-darwin - node@16 (push) Has been cancelled
build-and-deploy / stable - x86_64-apple-darwin - node@16 (push) Has been cancelled
build-and-deploy / build-wasm (nodejs) (push) Has been cancelled
build-and-deploy / build-wasm (web) (push) Has been cancelled
build-and-deploy / Deploy preview tarball (push) Has been cancelled
build-and-deploy / Potentially publish release (push) Has been cancelled
build-and-deploy / publish-turbopack-npm-packages (push) Has been cancelled
build-and-deploy / Deploy examples (push) Has been cancelled
build-and-deploy / thank you, build (push) Has been cancelled
build-and-deploy / Upload Turbopack Bytesize metrics to Datadog (push) Has been cancelled
Rspack Next.js development integration tests / Rspack integration tests (push) Has been cancelled
Rspack Next.js production integration tests / Rspack integration tests (push) Has been cancelled
Turbopack Next.js development integration tests / Next.js integration tests (push) Has been cancelled
Turbopack Next.js production integration tests / Next.js integration tests (push) Has been cancelled
Update Rspack test manifest / Update and upload Rspack development test manifest (push) Has been cancelled
Update Rspack test manifest / Update and upload Rspack production test manifest (push) Has been cancelled
Upload bundler test manifests to areweturboyet.com / Upload test results (push) Has been cancelled
Update React / create-pull-request (push) Has been cancelled
test-e2e-project-reset-cron / reset-test-project (push) Has been cancelled
Notify about the top 15 issues/PRs/feature requests (most reacted) in the last 90 days / run (push) Has been cancelled
49 lines
1.4 KiB
Bash
49 lines
1.4 KiB
Bash
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
# Determine production flag from DEPLOY_ENVIRONMENT
|
|
PROD=""
|
|
if [ "${DEPLOY_ENVIRONMENT:-preview}" = "production" ]; then
|
|
PROD="--prod"
|
|
fi
|
|
|
|
if [ -z "${VERCEL_API_TOKEN:-}" ]; then
|
|
echo "VERCEL_API_TOKEN was not providing, skipping..." >&2
|
|
exit 0
|
|
fi
|
|
|
|
CWD="."
|
|
PROJECT="next-docs"
|
|
|
|
echo "Preparing local build for docs (project: $PROJECT)..." >&2
|
|
|
|
# Ensure corepack and install only the docs workspace graph
|
|
if ! command -v corepack >/dev/null 2>&1; then
|
|
echo "Installing corepack..." >&2
|
|
npm i -g corepack@0.31 1>&2
|
|
fi
|
|
corepack enable 1>&2
|
|
|
|
echo "Installing dependencies for ./apps/docs..." >&2
|
|
# Reduce CI side-effects from deps we don't need for docs build
|
|
export NEXT_SKIP_NATIVE_POSTINSTALL=1
|
|
export PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
|
|
|
|
echo "Installing Vercel CLI..." >&2
|
|
npm i -g vercel@latest 1>&2
|
|
|
|
echo "Linking Vercel project..." >&2
|
|
vercel link --cwd "$CWD" --scope vercel --project "$PROJECT" --token "$VERCEL_API_TOKEN" --yes 1>&2
|
|
|
|
echo "Pulling env for $DEPLOY_ENVIRONMENT..." >&2
|
|
vercel pull --cwd "$CWD" --yes --environment="${DEPLOY_ENVIRONMENT:-preview}" --token="$VERCEL_API_TOKEN" 1>&2
|
|
|
|
echo "Building locally with Vercel..." >&2
|
|
vercel build --cwd "$CWD" --token="$VERCEL_API_TOKEN" 1>&2
|
|
|
|
echo "Deploying prebuilt output..." >&2
|
|
URL=$(vercel deploy --cwd "$CWD" --prebuilt --archive=tgz --token "$VERCEL_API_TOKEN" $PROD)
|
|
echo "$URL"
|
|
|
|
|