Deploy static websites to Buddy Packages. Use when user asks to "deploy static site", "host static files", "publish website", "upload build artifacts", or mentions deploying pre-built HTML/CSS/JS files, SPA builds, or static exports.
Resources
1Install
npx skillscat add sztwiorok/buddy-plugin/static-site Install via the SkillsCat registry.
Buddy Static Site Deployment
Host static websites with versioning via Buddy Packages. Each version gets a unique URL.
Prerequisites
Verify authentication with bdy whoami. If it fails, user must run bdy login in a separate terminal.
CRITICAL: AI Agent Requirements
STOP: Read before publishing any package.
Ask about authentication (MANDATORY for new packages)
Before creating a NEW package, you MUST use AskUserQuestion tool.
Question: "Do you want to protect this static site with authentication?"
Options:
- "HTTP Basic Auth (username:password)" → create with
-a user:passflag - "Buddy Authentication" → create with
--buddyflag - "No authentication (public)" → proceed without auth flags
Note: Auth is set on package creation, not per-version. For existing packages, skip this question.
Workflow
0. Ensure index.html exists (CRITICAL)
The main HTML file MUST be named index.html for the URL to serve the page directly. Without it, visitors will see a directory listing instead of the website.
- If deploying a single HTML file (e.g.,
mypage.html), rename it toindex.htmlbefore publishing - If deploying a directory, ensure it contains an
index.htmlat the root - Framework builds (Vite, Next.js static export) automatically create
index.html
# Example: rename single HTML file
mv mypage.html index.html1. Build Static Assets (if needed)
Most frameworks need a build step:
npm run build # Output: ./dist or ./build2. Determine Package Name and Version
- Package name: project name or user-specified
- Version: semantic versioning (1.0.0, 1.0.1, etc.)
3. Create Package (first time only)
Without auth (public):
bdy package create -i my-siteWith auth:
bdy package create -i my-site --buddy
bdy package create -i my-site -a admin:secret1234. Publish Version
bdy package publish my-site@1.0.0 ./distOverwrite existing version:
bdy package publish my-site@1.0.0 ./dist --force5. Show Results
bdy package version get my-site 1.0.0Output includes:
Url- the live site URLApp url- Buddy dashboard linkSize- package sizeCreated- timestamp
URL format:
https://<version>-<package>-<workspace>.files-pkg-2.registry.shExample: version 1.0.0 of package my-site in workspace myplayground:
https://1-0-0-my-site-myplayground.files-pkg-2.registry.shVersioning
Each version has its own URL. Old versions remain accessible.
# List all versions
bdy package version list my-site
# Delete old version
bdy package version delete my-site 0.9.0