Course lesson 47 · Dev Ops & Environments
Auto Deployments
Cloudflare’s repository-connected builds automate the user application’s stage and production deployments. A push to the stage branch triggers its stage command, and merging stage into main triggers production. The monorepo build must install dependencies, build the shared data package, and then deploy the selected application; the lesson uses build failures to uncover missing dependencies and missing build-time variables.
Primary source: course video 47 · Supplied English subtitles · 00:15:50.
Understand the idea
- The implementation uses Cloudflare’s Git-connected builds; GitHub Actions is discussed as an alternative for more customization.
- Monorepo deployment starts at the repository root so shared packages are built before the application consuming them.
- A clean build environment reveals dependencies accidentally supplied by the instructor’s local machine.
- Build-time variables are consumed while compiling the frontend; Worker runtime variables are a separate configuration surface.
- A successful build still needs an application-level smoke test.
What the course does
- Grant the Cloudflare integration access to the specific course repository and push a stage branch.
- Configure the stage user application to build from that branch using a root deployment script.
- Add dependency installation after the first build reports missing node_modules.
- Declare TypeScript as a workspace-root development dependency after the next build cannot find tsc.
- Configure production to build from main and test promotion through a pull request merge.
- Set the frontend host and Cloudflare environment as build variables, rebuild, and verify the dashboard.
Watch for
- The Git-connected build feature is described as beta at recording time.
- Backend auto-deployment configuration is left as an exercise; only frontend stage and production automation are demonstrated end to end.
- The instructor returns to CLI deployments for course speed, so later commands do not necessarily exercise the automated pipeline.
Recall before revealing
Why did a locally successful build fail when tsc was unavailable in Cloudflare?
Reveal the explanation
The local machine supplied TypeScript globally, while the clean build needed it declared and installed as a project dependency.
Try it
Explain the full command chain for a production frontend deployment from the monorepo root.
Check your result
You include installation, shared-package build, application filtering, production build, and deployment.
Practice prompts and answer checks are added teaching material. Answer from memory first, then compare and explain any difference.
Rewatch only what you need
Open this lesson in your original course library and seek to the times below. Videos are not hosted on this site.
- 00:00:00 — Connect repository to Cloudflare builds
- 00:05:38 — Missing dependency installation
- 00:06:38 — Missing TypeScript build dependency
- 00:11:50 — Build variables versus runtime secrets
Companion primary documentation: Wrangler environments. For recorded API names, commands, limits, and prices, check the version you use.