diff --git a/README.md b/README.md index 4945751..9859eb9 100644 --- a/README.md +++ b/README.md @@ -43,5 +43,10 @@ You can also use this pipeline programmatically: ```typescript import { deploy } from "https://pkg.fluentci.io/supabase_pipeline@v0.3.0/mod.ts"; -await deploy(); +await deploy( + ".", + Deno.env.get("SUPABASE_ACCESS_TOKEN")!, + Deno.env.get("PROJECT_ID")! +); + ``` diff --git a/src/dagger/pipeline.ts b/src/dagger/pipeline.ts index f802865..da9f156 100644 --- a/src/dagger/pipeline.ts +++ b/src/dagger/pipeline.ts @@ -12,7 +12,11 @@ export default async function pipeline(src = ".", args: string[] = []) { return; } - await deploy(src); + await deploy( + src, + Deno.env.get("SUPABASE_ACCESS_TOKEN")!, + Deno.env.get("PROJECT_ID")! + ); } async function runSpecificJobs(args: jobs.Job[]) { @@ -21,6 +25,10 @@ async function runSpecificJobs(args: jobs.Job[]) { if (!job) { throw new Error(`Job ${name} not found`); } - await job(); + await job( + ".", + Deno.env.get("SUPABASE_ACCESS_TOKEN")!, + Deno.env.get("PROJECT_ID")! + ); } }