Properly purge CDN cache.

This commit is contained in:
DS 2025-03-31 22:46:55 -07:00
parent 378614e30f
commit 7ef2fd83a1
2 changed files with 11 additions and 13 deletions

View file

@ -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(