Trigger Astro rebuilds on Payload updates. Tidy up .drone.yml
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
3wc 2024-05-18 01:05:16 -03:00
parent a597cc6e97
commit 16844e4a35
2 changed files with 3 additions and 13 deletions

View File

@ -48,12 +48,6 @@ steps:
trigger:
branch:
- main
event:
exclude:
- pull_request
trigger:
event:
exclude:
- custom

View File

@ -19,16 +19,12 @@ const Posts: CollectionConfig = {
process.env.NODE_ENV !== "development" &&
console.log(
await fetch(
`https://api.github.com/repos/${process.env.REPOSITORY}/dispatches`,
`https://drone.autonomic.zone/api/repos/${process.env.REPOSITORY}/builds`,
{
method: "POST",
headers: {
Accept: "application/vnd.github.everest-preview+json",
Authorization: `token ${process.env.TOKEN}`,
},
body: JSON.stringify({
event_type: "payload_update",
}),
Authorization: `Bearer ${process.env.TOKEN}`
}
}
)
);