.vitepress/dist, inside the folder that holds your content.
Configure VitePress
npx vitepress init names the build script docs:build, but the CLI runs build. Set the build command in bunny.jsonc at your project root. The CLI also expects .vitepress at the project root, so if your docs live in a docs folder, set the output directory too:
bunny.jsonc
cleanUrls off. With it on, VitePress writes about.html and links to /about, which returns a 404.
Deploy your site
- Bunny CLI
- Manually
1
Install the Bunny CLI and log in
2
Create a site
From your project root, run:Replace
my-site with a name for your site. The CLI creates a storage zone for your files and a pull zone to serve them, then links this directory to the new site. The site is served at a b-cdn.net address, and the CLI prints the URL.3
Build and deploy
bunny sites deployments publish --previous.4
Deploy on every push (optional)
.github/workflows/bunny-sites.yml that deploys the site on every push to main. Add your API key to the repository as a BUNNYNET_API_KEY secret. The CLI offers to run gh secret set BUNNYNET_API_KEY for you.Add a custom domain
With the Bunny CLI, add the domain to your site:CNAME record to create with your DNS provider. Once the record resolves, issue a free certificate with bunny sites domains ssl example.com.
For a manual deploy, add the hostname to your pull zone by following Custom hostnames.