mirror of
https://github.com/SukkaW/Surge.git
synced 2026-01-29 01:51:52 +08:00
CI: deploy to Cloudflare Pages
This commit is contained in:
@@ -52,7 +52,19 @@ export const downloadPreviousBuild = task(require.main === module, __filename)(a
|
||||
return span
|
||||
.traceChild('download & extract previoud build')
|
||||
.traceAsyncFn(async () => {
|
||||
const resp = await fetchWithRetry('https://codeload.github.com/sukkalab/ruleset.skk.moe/tar.gz/master', defaultRequestInit);
|
||||
const resp = await fetchWithRetry('https://codeload.github.com/sukkalab/ruleset.skk.moe/tar.gz/master', {
|
||||
...defaultRequestInit,
|
||||
retry: {
|
||||
retryOnNon2xx: false
|
||||
}
|
||||
});
|
||||
|
||||
if (resp.status !== 200) {
|
||||
console.warn('Download previous build failed! Status:', resp.status);
|
||||
if (resp.status === 404) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!resp.body) {
|
||||
throw new Error('Download previous build failed! No body found');
|
||||
|
||||
Reference in New Issue
Block a user