World map

 

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

      bash
      npx wrangler deploy --dry-run
      ⛅️ wrangler 4.156.0
      ────────────────────
      ✨ Read 2 files from the assets directory /home/you/kedai-kancil/dist
      Total Upload: 0.39 KiB / gzip: 0.27 KiB
      No bindings found.
      --dry-run: exiting now.
      A dry run reads two files, shows the upload size, finds no bindings and stops without uploading.

      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.

      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.

      What happened on GitHub

      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

      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.