Replies: 1 comment 2 replies
-
(moved to discussion) cool, thanks for sharing! I wonder if this could run as a Cloudflare Workers scheduled job instead of on GitHub Actions, that would let you eliminate needing the credentials. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I created a GitHub workflow that periodically (currently set to once every two months) downloads the latest tileset and uploads it to Cloudflare R2. It also updates the cloudflare worker to point to the new tileset after it is uploaded and then deletes the old tileset so you are not paying for extra storage of old tilesets unnecessarily...there should be essentially no downtime as the worker is only updated after the new tileset successfully uploads.
The only "gotchas" here are:
labels: 8core-ubuntu
is just what I have called the larger runner I set upThe cron is set to run once every two months on the 1st at 21:45 ... as it seems the tiles are usually updated in late morning at https://maps.protomaps.com/builds/ but sometimes there are some later timestamps. You can also trigger it manually with the workflow_dispatch
You need to set up a few environment variables in the repo as well:
Account -> Workers Scripts -> Edit
and make sure to scope to the account the worker is inHappy to document it in more detail if you would like to add it to the repo (feel free to ping me), or you can just close this issue and have it available from google search :-)
Just thought it might be useful for some people in the future!
Beta Was this translation helpful? Give feedback.
All reactions