diff --git a/README.md b/README.md index 0e0f9d4..01ab1e1 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ jobs: with: directory: dist storage-zone: example-org - purge-endpoint: https://tionis-static-site-purge.bunny.run + purge-endpoint: https://gandalf.bunny.run env: BUNNY_STORAGE_PASSWORD: ${{ secrets.BUNNY_STORAGE_PASSWORD }} ``` diff --git a/static_site.py b/static_site.py index c6d2a0b..79fbceb 100755 --- a/static_site.py +++ b/static_site.py @@ -278,8 +278,8 @@ def purge_bunny_gateway(endpoint: str, zone: str, password: str) -> None: ): raise DeployError("BUNNY_PURGE_ENDPOINT must be an HTTPS origin without a path") url = ( - f"https://{parsed.hostname}/v1/purge/" - f"{urllib.parse.quote(zone, safe='')}" + f"https://{parsed.hostname}/v1/static-sites/" + f"{urllib.parse.quote(zone, safe='')}/purge" ) request = urllib.request.Request( url, diff --git a/tests/test_static_site.py b/tests/test_static_site.py index e850010..7366e4f 100644 --- a/tests/test_static_site.py +++ b/tests/test_static_site.py @@ -196,7 +196,7 @@ class StaticSiteTests(unittest.TestCase): request = urlopen.call_args.args[0] self.assertEqual( request.full_url, - "https://purge.example/v1/purge/example-org", + "https://purge.example/v1/static-sites/example-org/purge", ) self.assertEqual(request.method, "POST") self.assertEqual(