mirror of
https://github.com/Instadapp/assets.git
synced 2024-07-29 22:27:41 +00:00
wipe digital ocean cdn cache after updating space
This commit is contained in:
parent
56ad138c28
commit
e052538c48
5
.github/workflows/synchronize-cdn.yml
vendored
5
.github/workflows/synchronize-cdn.yml
vendored
|
@ -24,6 +24,8 @@ jobs:
|
||||||
AWS_ACCESS_KEY: ${{ secrets.CDN_ACCESS_KEY }}
|
AWS_ACCESS_KEY: ${{ secrets.CDN_ACCESS_KEY }}
|
||||||
AWS_SECRET_KEY: ${{ secrets.CDN_SECRET_KEY }}
|
AWS_SECRET_KEY: ${{ secrets.CDN_SECRET_KEY }}
|
||||||
CDN_BUCKET: ${{ secrets.CDN_BUCKET }}
|
CDN_BUCKET: ${{ secrets.CDN_BUCKET }}
|
||||||
|
DO_TOKEN: ${{ secrets.DO_TOKEN }}
|
||||||
|
CDN_ID: ${{ secrets.CDN_ID }}
|
||||||
run: |
|
run: |
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
@ -54,3 +56,6 @@ jobs:
|
||||||
rclone sync -P . s3:$CDN_BUCKET/
|
rclone sync -P . s3:$CDN_BUCKET/
|
||||||
|
|
||||||
rclone config delete s3
|
rclone config delete s3
|
||||||
|
|
||||||
|
# Wipe out DigitalOcean CDN cache
|
||||||
|
curl -X DELETE -H "Content-Type: application/json" -H "Authorization: Bearer $DO_TOKEN" -d '{"files": ["*"]}' https://api.digitalocean.com/v2/cdn/endpoints/$CDN_ID/cache
|
||||||
|
|
Loading…
Reference in New Issue
Block a user