misc: added autoredeploy option for cf pages integration

This commit is contained in:
Sheen Capadngan
2024-06-07 13:23:46 +08:00
parent c1ca2a6f8c
commit cd92ce627c
2 changed files with 37 additions and 2 deletions
@@ -2750,6 +2750,20 @@ const syncSecretsCloudflarePages = async ({
}
}
);
const metadata = z.record(z.any()).parse(integration.metadata);
if (metadata.shouldAutoRedeploy) {
await request.post(
`${IntegrationUrls.CLOUDFLARE_PAGES_API_URL}/client/v4/accounts/${accessId}/pages/projects/${integration.app}/deployments`,
{},
{
headers: {
Authorization: `Bearer ${accessToken}`,
Accept: "application/json"
}
}
);
}
};
/**