platform
Generate platform configuration and CI/CD workflow files for popular providers. Reads your config.toml and content aliases to produce ready-to-use deploy configs.
# Hosting platforms
hwaro tool platform netlify
hwaro tool platform vercel
hwaro tool platform cloudflare
# CI/CD workflows
hwaro tool platform github-pages
hwaro tool platform gitlab-ci
# Output to custom path
hwaro tool platform netlify -o deploy/netlify.toml
# Print to stdout instead of writing file
hwaro tool platform vercel --stdout
Note:
hwaro tool ciis deprecated. Usehwaro tool platform github-pagesinstead.
Supported Platforms
| Platform | Output File | Description |
|---|---|---|
| netlify | netlify.toml |
Build settings, redirects, headers |
| vercel | vercel.json |
Build command, routing, cache headers |
| cloudflare | wrangler.toml |
Workers/Pages site config |
| github-pages | .github/workflows/deploy.yml |
GitHub Actions build + deploy workflow |
| gitlab-ci | .gitlab-ci.yml |
GitLab CI/CD pipeline |
Options
| Flag | Description |
|---|---|
| -o, --output PATH | Output file path (default: auto-detected) |
| --stdout | Print to stdout instead of writing file |
| -f, --force | Overwrite existing file without warning |
| -h, --help | Show help |
If the output file already exists, use --force to overwrite.
Generated Config
Each config includes:
- Build command:
hwaro build - Output directory:
public/ - Redirects: 301 redirects from page
aliasesdefined in frontmatter (e.g.,aliases: ["/old-url/"]) - Cache headers: Long-lived caching for static assets
Netlify Output
[build]
command = "hwaro build"
publish = "public"
[build.environment]
# Add environment variables here
[[redirects]]
from = "/old-url/"
to = "/posts/new-post/"
status = 301
[[headers]]
for = "/assets/*"
[headers.values]
Cache-Control = "public, max-age=31536000, immutable"
Vercel Output
{
"buildCommand": "hwaro build",
"outputDirectory": "public",
"redirects": [
{
"source": "/old-url/",
"destination": "/posts/new-post/",
"statusCode": 301
}
],
"headers": [
{
"source": "/assets/(.*)",
"headers": [
{
"key": "Cache-Control",
"value": "public, max-age=31536000, immutable"
}
]
}
]
}
See Also
- GitHub Pages | GitLab CI | Netlify | Vercel | Cloudflare Pages — Platform deploy guides
- CLI Reference — All tool commands