chore: sync vercel env var with trigger.dev and deploy (#25610)
* chore: sync vercel env var with trigger.dev * chore: get trigger version from .env.production * chore: deploy trigger dev tasks in draft release * fixup! chore: deploy trigger dev tasks in draft release * fixup! Merge branch 'main' into sync-trigger-dev-env-vercel * remove trigger version from commit message it's already in .env.production * chore: use generated token instead of GITHUB_TOKEN in draft release * fix: code review
This commit is contained in:
1 parent
97bfb8158d
commit
ecaf24d9a2
6 files changed
+93
-10
No files matched your search
@@ -9,7 +9,8 @@
|
||||
"scripts": {
|
||||
"lint": "biome lint .",
|
||||
"dev:trigger": "npx trigger.dev@latest dev --analyze",
|
||||
"deploy:trigger": "npx trigger.dev@latest deploy"
|
||||
"deploy:trigger:prod": "npx trigger.dev@latest deploy --skip-promotion",
|
||||
"deploy:trigger:staging": "npx trigger.dev@latest deploy --env staging --skip-promotion"
|
||||
},
|
||||
"dependencies": {
|
||||
"@calcom/atoms": "workspace:*",
|
||||
|
||||
@@ -1,8 +1,15 @@
|
||||
import { syncVercelEnvVars } from "@trigger.dev/build/extensions/core";
|
||||
import { defineConfig } from "@trigger.dev/sdk";
|
||||
import dotEnv from "dotenv";
|
||||
|
||||
dotEnv.config({ path: "../../.env" });
|
||||
|
||||
const canSyncEnvVars = Boolean(
|
||||
process.env.TRIGGER_DEV_VERCEL_ACCESS_TOKEN &&
|
||||
process.env.TRIGGER_DEV_VERCEL_PROJECT_ID &&
|
||||
process.env.TRIGGER_DEV_VERCEL_TEAM_ID
|
||||
);
|
||||
|
||||
export default defineConfig({
|
||||
// Your project ref from the Trigger.dev dashboard
|
||||
project: process.env.TRIGGER_DEV_PROJECT_REF ?? "", // e.g., "proj_abc123"
|
||||
@@ -22,9 +29,29 @@ export default defineConfig({
|
||||
},
|
||||
},
|
||||
|
||||
// Keep the process alive after the task has finished running so the next task doesn’t have to wait for the process to start up again.
|
||||
processKeepAlive: true,
|
||||
|
||||
// Build configuration (optional)
|
||||
build: {
|
||||
external: ["@prisma/client", "nodemailer", "jsdom", "playwright-core", "playwright", "chromium-bidi"],
|
||||
extensions: canSyncEnvVars
|
||||
? [
|
||||
syncVercelEnvVars({
|
||||
// A personal access token created in your Vercel account settings
|
||||
// Used to authenticate API requests to Vercel
|
||||
// Generate at: https://vercel.com/account/tokens
|
||||
vercelAccessToken: process.env.TRIGGER_DEV_VERCEL_ACCESS_TOKEN,
|
||||
// The unique identifier of your Vercel project
|
||||
// Found in Project Settings > General > Project ID
|
||||
projectId: process.env.TRIGGER_DEV_VERCEL_PROJECT_ID,
|
||||
// Optional: The ID of your Vercel team
|
||||
// Only required for team projects
|
||||
// Found in Team Settings > General > Team ID
|
||||
vercelTeamId: process.env.TRIGGER_DEV_VERCEL_TEAM_ID,
|
||||
}),
|
||||
]
|
||||
: [],
|
||||
},
|
||||
|
||||
// Max duration of a task in seconds
|
||||
|
||||
Reference in new issue
Block a user