BM: Baca dalam Bahasa Melayu
World C3: Release & Deploy
Deploy to Cloudflare from Actions
You will learn: how this very site ships itself to Cloudflare, and when you need Cloudflare Containers.
Checked with GitHub Actions 2026-10 on 31 Oct 2026
The problem
This course has over 150 lessons, in two languages. After each merge, who puts them online?
Pick one answer.
Watch
This site is Workers static assets: Cloudflare keeps your built files (HTML, CSS, pictures) on its servers around the world. Packed food on a shelf: nothing to cook.: built files Cloudflare serves worldwide. Packed food on a shelf, nothing to cook. What fits where?
Drag a card into a box. Or tap the card, then tap the box.
Watch
Tap each point on the timeline.
Need a real server? Cloudflare Containers: Runs your container image on Cloudflare, behind a Worker. It needs the Workers Paid plan. run your image behind a Worker. They are generally available since April 2026, on the Workers Paid plan. Tap how wrangler deploy ships one.
Watch
Safe by default: dry run first. It checks your config and files, then uploads nothing.
Try it
Now build this site’s pipeline, in short. Check everything. Deploy only from main.
Tap blocks to add them. Put them in order.
Blocks
Your workflow
Tap a block above to start.
Workflow file .github/workflows/
name: CI
What runs
Nothing to run yet.
Hint
Both triggers, permissions, the check job and its steps. Then the main-only deploy job and its steps.Predict
A pull request runs this workflow. What does the deploy job do?
Pick one answer.
Check
Check it on the belt. Find an event where deploy is skipped.
Try the events. Find the one asked for.
Workflow file .github/workflows/ci.yml
name: CI on: push: pull_request: permissions: contents: read jobs: check: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - run: npm ci - run: npm test deploy: needs: check if: github.event_name == 'push' && github.ref == 'refs/heads/main' runs-on: ubuntu-latest concurrency: group: deploy-production cancel-in-progress: false steps: - uses: actions/checkout@v7 - run: npm ci - run: npm run deploy env: CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
The line
Push to main · main
Hint
Try the pull request, or a push to another branch.You did it!
You can now ship a site to Cloudflare from GitHub Actions.
Go deeper (optional)
This site’s real file is .github/workflows/ci.yml. Its deploy job waits for two jobs: check and workflows. Containers can pull from Cloudflare’s registry, Docker Hub, Amazon ECR or Google’s registry. A GHCR image? Push it to Cloudflare’s registry first.
Real rep (optional): run npx wrangler deploy --dry-run in a small Worker project.
Bahasa Melayu
Kursus ini ada lebih 150 pelajaran, dalam dua bahasa. Selepas setiap merge, siapa letak semuanya dalam talian?
Laman ini guna Workers static assets: fail siap yang Cloudflare hidang sedunia. Makanan siap bungkus di rak, tiada apa nak dimasak. Mana sesuai di mana?
Perlukan server sebenar? Cloudflare Containers jalankan image anda di belakang sebuah Worker. Ia tersedia umum sejak April 2026, pada pelan Workers Paid. Tekan cara wrangler deploy menghantarnya.
Selamat sebagai lalai: buat larian cuba dulu. Ia semak tetapan dan fail anda, tanpa muat naik apa-apa.
Sekarang bina pipeline laman ini, versi ringkas. Semak semua. Deploy dari main sahaja.
Satu pull request jalankan workflow ini. Apa job deploy buat?
Semak pada tali sawat. Cari acara yang buat deploy dilangkau.
Kini anda boleh hantar laman ke Cloudflare dari GitHub Actions.
You finished this before. Practice is always welcome!
Official docs: Cloudflare Workers: GitHub Actions · Cloudflare Workers: static assets · Cloudflare Containers · Containers: rollouts
You've learned for 25 minutes. A short break helps your brain.
Sprint done! Great focus. Stretch for a minute?