Static artifact hosting
Host HTML, CSS, JavaScript, images, and downloads directly — ideal for SPAs, marketing sites, docs, and static assets.
Host SPAs, marketing sites, docs, and static assets over CDN and HTTPS, then bind custom domains and routing rules for production.
Docusaurus · 148 pages
HTML · CSS · JS · Images
HTTPS · CDN · Route rewrite
The pipeline produces reproducible static files first, then deploys the same artifacts to the target environment — domains and CDN only deliver verified output.
Git push · CI trigger
npm ci · npm run build
Hosting · CDN · Domain
From static files to user domains — artifacts, routing, certificates, caching, and automated release.
Host HTML, CSS, JavaScript, images, and downloads directly — ideal for SPAs, marketing sites, docs, and static assets.
Assets cache at CDN edge nodes; default entry points include HTTP and HTTPS with no web server to run.
Bind business domains with the right CDN type, certificates, and DNS so users reach your site through a stable entry.
When React Router or Vue Router uses history mode, rewrite unmatched paths to index.html.
Build React, Vue, Angular, VitePress, Astro, and more online; Next.js is limited to static export.
Upload existing artifacts locally, or install dependencies, build, verify, and deploy in continuous integration.
Static hosting is not just uploading files — every build should have clear artifacts, a fixed entry, and a repeatable delivery process.Product design principle
Define root and subpath boundaries first, then configure domains, caching, and rewrites — avoid retrofitting routing after pages ship.
View custom domainsExamples cover existing hosting and CLI capabilities; this docs site's production pipeline will be added separately at launch.
Vite base must match the deploy path; other static generators should also fix output directory and asset prefix explicitly.
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
export default defineConfig({
plugins: [react()],
base: '/',
build: {
outDir: 'dist'
}
})
// npm run build
// dist/index.html + dist/assets/*hosting deploy does not install or build — it uploads a directory only, so pipelines can run their own quality gates before deploy.
# Sign in and select the target environment
tcb login
# Build with your project's own scripts
npm ci
npm run build
# Deploy static artifacts to the root path
tcb hosting deploy dist -e <env-id>Credentials come from pipeline secrets, not the repo; the example shows capability structure without creating real deploy jobs locally.
name: deploy-website
on:
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- run: npm ci
- run: npm run build
- run: npm install -g @cloudbase/cli
- run: tcb hosting deploy dist -e "$TCB_ENV_ID"If the final output is static files, it can follow the same build and delivery flow.
React, Vue, Angular, and other SPAs.
Docusaurus, VitePress, Hugo, and Hexo.
Marketing sites, campaign pages, component docs, and downloads.
Confirm output directory, asset prefix, and routing behavior, then deliver the same artifacts via CLI or pipeline.