feat: initial commit
This commit is contained in:
commit
0ff7457679
192 changed files with 24379 additions and 0 deletions
20
workers/rebuild/index.js
Normal file
20
workers/rebuild/index.js
Normal file
|
@ -0,0 +1,20 @@
|
|||
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");
|
||||
},
|
||||
};
|
10
workers/rebuild/wrangler.template.toml
Normal file
10
workers/rebuild/wrangler.template.toml
Normal file
|
@ -0,0 +1,10 @@
|
|||
name = "scheduled-rebuild-worker"
|
||||
main = "./index.js"
|
||||
compatibility_date = "2023-01-01"
|
||||
|
||||
account_id = "${CF_ACCOUNT_ID}"
|
||||
workers_dev = true
|
||||
|
||||
[env.production]
|
||||
name = "scheduled-rebuild-worker-production"
|
||||
triggers = {crons = ["0 * * * *"]}
|
Reference in a new issue