MCPcopy Create free account
hub / github.com/observablehq/framework / deploy

Function deploy

src/deploy.ts:87–101  ·  view source on GitHub ↗
(deployOptions: DeployOptions, effects = defaultEffects)

Source from the content-addressed store, hash-verified

85 | {create: false; workspace: {id: string; login: string}; project: GetProjectResponse};
86
87export async function deploy(deployOptions: DeployOptions, effects = defaultEffects): Promise<void> {
88 Telemetry.record({event: "deploy", step: "start", force: deployOptions.force});
89 effects.clack.intro(`${inverse(" observable deploy ")} ${faint(`v${process.env.npm_package_version}`)}`);
90 effects.clack.log.warn(
91 wrapAnsi(
92 `Deploying data apps to Observable Cloud is now deprecated. Please migrate your data app to another static site hosting provider, such as GitHub Pages, Render, Cloudflare Pages, Vercel, or Netlify. For more details, please see: ${underline(
93 "https://observablehq.com/release-notes/2025-04-15-deprecating-observable-cloud"
94 )}`,
95 effects.outputColumns
96 )
97 );
98 const deployInfo = await new Deployer(deployOptions, effects).deploy();
99 effects.clack.outro(`Deployed app now visible at ${link(deployInfo.url)}`);
100 Telemetry.record({event: "deploy", step: "finish"});
101}
102
103class Deployer {
104 private deployOptions: DeployOptions;

Callers 1

deploy-test.tsFile · 0.85

Calls 6

linkFunction · 0.85
recordMethod · 0.80
introMethod · 0.80
deployMethod · 0.80
outroMethod · 0.80
warnMethod · 0.45

Tested by

no test coverage detected