This repository has been archived on 2025-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
coryd.dev-eleventy/workers/rebuild/index.js

17 lines
No EOL
407 B
JavaScript

export default {
async scheduled(event, env, ctx) {
const deployHookUrl = env.DEPLOY_HOOK_URL
const response = await fetch(deployHookUrl, {
method: 'POST',
})
if (!response.ok) {
const errorText = await response.text()
console.error(`Error triggering deploy: ${response.statusText}`, errorText)
return
}
console.log('Deploy triggered successfully')
}
}