forked from epesooj/webring
Properly purge CDN cache.
This commit is contained in:
parent
378614e30f
commit
7ef2fd83a1
2 changed files with 11 additions and 13 deletions
|
@ -1,5 +1,5 @@
|
|||
import { join } from '@std/path';
|
||||
import { deployScript, purgePath, uploadFile } from './bunny_api/main.ts';
|
||||
import { deployScript, purgeCDNCache, uploadFile } from './bunny_api/main.ts';
|
||||
|
||||
if (import.meta.main) {
|
||||
console.log(`Attempting to upload index.html`);
|
||||
|
@ -8,8 +8,8 @@ if (import.meta.main) {
|
|||
await uploadFile('index.html', indexContents);
|
||||
console.log(`Done!`);
|
||||
|
||||
console.log(`Attempting to purge the cache for index.html`);
|
||||
await purgePath('index.html');
|
||||
console.log(`Attempting to purge the CDN cache.`);
|
||||
await purgeCDNCache();
|
||||
console.log(`Done!`);
|
||||
|
||||
for (const dirEntry of Deno.readDirSync(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue