Deployments
How Clouzark builds and serves your app.
From GitHub
Every push to a connected repository creates a deployment:
- A push to the production branch (set per project,
mainby default) deploys to production. - A push to any other branch, or a pull request, deploys a preview with its own URL.
Each deployment also keeps its own immutable URL, so you can always open exactly what a given build served.
To deploy without pushing, run:
clouzark deploy # the current branch's latest pushed commit
clouzark deploy --branch staging
clouzark deploy --prod # the production branch, to productionclouzark deploy builds what's on GitHub, not your local files. It warns when you have uncommitted changes or unpushed commits that won't be included.
From your machine
--upload builds the directory as it is now, uncommitted changes included:
clouzark deploy --upload # preview, named after the current branch
clouzark deploy --upload --prod # production- In a git repo, the CLI sends the files git sees (tracked and untracked, minus
.gitignore). Outside a git repo it skipsnode_modules, build output, and similar folders, and--uploadis the default. .envfiles are never sent. Set variables withclouzark env add.- The upload limit is 100 MB.
Frameworks
Clouzark detects the framework from the repository:
| Framework | How it runs |
|---|---|
| Next.js | next build, then next start |
| React (Vite and similar) | Built, then served as a single-page app from the output directory (dist by default) |
| Node | npm run start; the app should listen on the PORT and HOST environment variables |
| Static HTML | Served as-is |
The build command, output directory, install command, and root directory (for monorepos) can be changed in the project's settings.
Monorepos
One repository can hold several projects. Import the repo once per app and give each project its own root directory, such as apps/web and docs:
clouzark projects create acme/monorepo --name acme-web --root apps/web
clouzark projects create acme/monorepo --name acme-docs --root docsA push then builds every project that uses the repo, except projects whose root directory had no changes. To always build on every push, turn off Skip deployments when nothing in the root directory changed in the project's settings. Deploys started from the dashboard or with clouzark deploy always build.
Build logs
clouzark deployments ls # recent deployments
clouzark logs # the latest deployment's log
clouzark logs <id> -f # follow a build until it finishesA deployment moves through queued, building, deploying, and then live, failed, or canceled.
Promote and roll back
clouzark promote <id> # make a deployment the live production deployment
clouzark rollback # go back to the previous production deployment
clouzark redeploy # rebuild the latest deployment with current env vars
clouzark cancel <id> # cancel a deployment that's still queuedPromotion and rollback switch traffic without rebuilding, so they only work with deployments that are still live.