-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
This reverts commit 554cfdc.
- Loading branch information
Showing
17 changed files
with
3,708 additions
and
3,281 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# build output | ||
dist | ||
.vercel | ||
.netlify | ||
|
||
# dependencies | ||
node_modules/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
18 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
pnpm-lock.yaml | ||
.vercel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[dev] | ||
command = "astro dev" | ||
targetPort = 3000 | ||
publish = "public" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { schedule } from '@netlify/functions'; | ||
|
||
const nightlyBuildHook = process.env.NIGHTLY_BUILD_HOOK; | ||
if (!nightlyBuildHook) { | ||
throw new Error('NIGHTLY_BUILD_HOOK environment variable is undefined'); | ||
} | ||
|
||
export const handler = schedule('0 8 * * *', async function handler() { | ||
try { | ||
const response = await fetch(nightlyBuildHook, { | ||
method: 'POST', | ||
body: JSON.stringify({}), | ||
headers: { 'Content-Type': 'application/json' }, | ||
}); | ||
|
||
if (!response.ok) { | ||
// NOT res.status >= 200 && res.status < 300 | ||
return { statusCode: response.status, body: response.statusText }; | ||
} | ||
|
||
return { statusCode: 200 }; | ||
} catch (error) { | ||
// output to netlify function log | ||
console.error(error); | ||
return { statusCode: 500, body: 'An internal error occurred' }; | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.