Menu

Post image 1
Post image 2
1 / 2
0

I Shipped My First Cloudflare Worker via GitHub Actions in 47 Minutes (3 Were Wasted on the Wrong API Token)

DEV Community·Kiell Tampubolon·29 days ago
#GW384eMh
#cloudflare#github#worker#token#article#ama
Reading 0:00
15s threshold

My first Cloudflare Worker deployed in 47 minutes. Three of those were spent staring at this exact error in a red GitHub Actions log: Authentication error [code: 10000] . I had the API token. I had the account ID. I had copy-pasted the workflow from the official docs. It still failed. The fix was one checkbox I never selected. That checkbox is the entire reason I'm writing this post, because every tutorial I read assumed I would not get it wrong. What I Built A Cloudflare Worker that returns a JSON response saying hello. Three lines of actual logic. One wrangler.toml file. One GitHub Actions workflow. Push to main , the Worker is live on the edge, end of story. The point was never the Worker itself. The point was getting the pipeline working so the next 100 commits ship themselves. The Setup That Actually Works Here is the worker. It lives at src/index.js : export default { async fetch ( request , env , ctx ) { return Response . json ({ message : " Hello from the edge " , region : request . cf ?. colo ??…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More