Skip to content

Commit

Permalink
fix(mu): add deploy script
Browse files Browse the repository at this point in the history
  • Loading branch information
TillaTheHun0 committed Oct 23, 2023
1 parent 507e4ab commit 1ceb3b2
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions servers/mu/deploy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { z } from 'zod'

function env (key) {
const res = z.string().min(1).safeParse(process.env[key])
if (!res.success) {
console.error(`Error with ENV VAR: ${key}`)
throw res.error
}
return res.data
}

const deploy = async (deployHook) => {
const response = await fetch(deployHook, { method: 'POST' })
.then((res) => res.json())
.catch((err) => err)
console.log('Deploying To Render. Response:', response)
}

deploy(env('DEPLOY_HOOK'))

0 comments on commit 1ceb3b2

Please sign in to comment.