-
Notifications
You must be signed in to change notification settings - Fork 420
Update sync script to support Cloudflare R2 and CDN cache purging #169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: gh-pages
Are you sure you want to change the base?
Conversation
|
I tested the script locally with some dummy files and it's working. Soon @clonker will run the script with a local copy he has of the full repository. |
r0qs
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. Thanks a lot for that @marcocastignoli! It looks good to me. Just a small comment.
| separator="" | ||
| for path in "${purge_paths[@]}"; do | ||
| purge_payload+="${separator}\"https://${cloudflare_cache_host}${path}\"" | ||
| separator="," |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume the trailing comma at the end of purge_payload will not cause problems?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's not at the end, it's at the beginning. the separator is "" for the first one (prefix) and then , "others"
Instructions to test the script
The script will delete the .git folder, so before proceeding
Then set the environment variables
Finally run the script