Skip to content

Commit bbf3fb3

Browse files
committed
Use a flag to control compilation as part of compile
1 parent c5ba499 commit bbf3fb3

File tree

5 files changed

+13
-3
lines changed

5 files changed

+13
-3
lines changed

.github/workflows/roam-main.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ jobs:
5151
version: ${{ github.sha }}
5252

5353
- name: Deploy
54-
run: npx turbo run deploy --filter=roam --ui stream
54+
run: npx turbo run deploy --filter=roam --ui stream -- --no-compile

.github/workflows/roam-pr.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,4 @@ jobs:
5252
version: ${{ github.sha }} # Optional; falls back to current commit SHA
5353

5454
- name: Deploy
55-
run: npx turbo run deploy --filter=roam --ui stream
55+
run: npx turbo run deploy --filter=roam --ui stream -- --no-compile

.github/workflows/roam-release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ jobs:
5151
version: ${{ steps.roam-version.outputs.current-version }}
5252

5353
- name: Update Roam Depot Extension
54-
run: npx turbo run publish --filter=roam --ui stream
54+
run: npx turbo run publish --filter=roam --ui stream -- --no-compile

apps/roam/scripts/deploy.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { put } from "@vercel/blob";
22
import fs, { readFileSync } from "fs";
33
import { join } from "path";
4+
import { compile } from "./compile";
45
import { config } from "@repo/database/dbDotEnv";
56
import { execSync } from "child_process";
67

@@ -15,6 +16,14 @@ const deploy = async () => {
1516
};
1617

1718
console.log("Deploying ...");
19+
if (!process.argv.includes("--no-compile"))
20+
try {
21+
console.log("Building");
22+
await compile({});
23+
} catch (error) {
24+
console.error("Deployment failed on compile:", error);
25+
process.exit(1);
26+
}
1827
try {
1928
const resolvedWorkspace = "roam";
2029
if (!resolvedWorkspace) throw new Error("Workspace is required");

turbo.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
"POSTHOG_CLI_ENV_ID"
8181
],
8282
"cache": false,
83+
"dependsOn": ["^build"],
8384
"inputs": ["$TURBO_DEFAULT$", ".env*"]
8485
},
8586
"publish": {

0 commit comments

Comments
 (0)