sst / ion

❍ — a new engine for SST
https://ion.sst.dev
MIT License
1.08k stars 126 forks source link

Old files are not deleted when new builds are uploaded for StaticSite #465

Open brandonbaraban opened 1 month ago

brandonbaraban commented 1 month ago

We have a StaticSite that is just plain old HTML, CSS, and Javascript. We removed some of the pages from the website, but after deploying, old HTML files are still in the bucket and users are still able to navigate to old webpages directly.

We have no control over what pages are exposed in our website without manually going into the bucket and deleting the files, which is extremely tedious.

Can there be an option added for deleting old files from the bucket when new builds are uploaded? Ideally, after deploying, the state of the StaticSite would reflect our local build directory that is being uploaded.

I personally feel this should be the expected / default behavior, but I know that some websites depend on old files being present, so not sure what the best approach is here.