A Sarde site builds to plain HTML, CSS, and JavaScript, so any static host can serve it. Pick your host below for step-by-step instructions.
Publish with GitHub Actions or push to a gh-pages branch.
Build from Git, deploy with sarde deploy, or use the Netlify CLI.
Build from Git, deploy with sarde deploy, or use Wrangler.
Build from Git, deploy with sarde deploy, or use the Vercel CLI.
Upload dist/ anywhere, or run your own command with sarde deploy.
Build for production
Every deployment method publishes the output of sarde build:
sarde build→ The terminal prints a summary:
Built 9 pages in 320 ms Output: /path/to/my-site/distThe dist/ directory contains the complete site: HTML pages, CSS, JavaScript, images, feeds, sitemap, and search index. Change the directory with --output or build.output in sarde.yaml.
Deployment methods
Each host page covers up to three methods:
| Method | How it works | Use it when |
|---|---|---|
| Deploy from Git | The host clones your repository, installs Sarde, and builds on every push. | You want every push to main to publish automatically. |
sarde deploy |
Sarde uploads your local dist/ to the host through its API. --build builds it first, in the same run. |
You build on your own machine or in your own CI job. |
| Host CLI | The host's own tool (netlify, wrangler, vercel) uploads dist/. |
You already use that tool, or sarde deploy does not support your setup. |
Deploy tokens
sarde deploy reads API tokens from environment variables. Tokens never go in sarde.yaml, because that file is usually committed.
| Provider | Token variable | Other settings |
|---|---|---|
| Netlify | NETLIFY_AUTH_TOKEN |
site_id |
| Cloudflare Pages | CLOUDFLARE_API_TOKEN |
project_name, account_id (or CLOUDFLARE_ACCOUNT_ID) |
| Vercel | VERCEL_TOKEN |
project_id, team_id for team projects (or VERCEL_ORG_ID) |
| GitHub Pages | None | Uses the git credentials already configured for the origin remote |
In CI, store the token as a repository secret and expose it to the deploy step under the variable name above.
Check access before the first deploy
--check confirms that the configured site or project exists and that Sarde can reach it. It uploads nothing:
sarde deploy --check→ The terminal prints:
Credentials OK: netlify can deploy to docs (https://docs.example.com)On later deploys, Sarde uploads only the files the host does not already have, so a redeploy after a small change sends a few files, not the whole site.
See deploy in CLI Commands for all flags and the --format json event stream, and deploy in Configuration for all options.
GitHub Pages
Deploy a Sarde site to GitHub Pages with GitHub Actions or by pushing to a gh-pages branch
Netlify
Deploy a Sarde site to Netlify from Git, with sarde deploy, or with the Netlify CLI
Cloudflare Pages
Deploy a Sarde site to Cloudflare Pages from Git, with sarde deploy, or with Wrangler
Vercel
Deploy a Sarde site to Vercel from Git, with sarde deploy, or with the Vercel CLI
Other Hosts
Deploy a Sarde site to any static host, or run your own deploy command with the custom provider