Deploy to Production
Because a pack builds to plain static files, you can host it on any static
provider. Pick the platform you use and point it at the build command and the
dist/ output.
Choose a platform
Section titled “Choose a platform”-
Set
siteandbaseinastro.config.mjsto match your Pages URL:astro.config.mjs export default defineConfig({site: 'https://my-org.github.io',base: '/my-pack',integrations: [starlight({ plugins: [nebari()] })],}); -
Add a workflow that builds and uploads the artifact:
.github/workflows/deploy.yml - run: npm ci && npm run build- uses: actions/upload-pages-artifact@v3with:path: dist -
Enable Pages in the repo settings with source GitHub Actions.
-
Create a Pages project and connect your repository.
-
Set the build command to
npm run buildand the output directory todist. -
If serving under a subpath, add
--base /my-packto the build command and setbaseto match.
[build]command = "npm run build"publish = "dist"Vercel detects Astro automatically. Confirm the output directory is dist
and the build command is npm run build; no extra config is needed for a
root-hosted site.
Serving under a subpath Common for packs
Section titled “Serving under a subpath ”Packs are often published together under one domain, e.g.
packs.nebari.dev/my-pack. When that’s the case:
-
Build with the matching base:
astro build --base /my-pack. -
Set
logoHrefto the portal root so the logo returns users to the index:nebari({ logoHref: 'https://packs.nebari.dev/' }); -
Confirm assets resolve by checking the built HTML references the base — every
href/srcshould start with/my-pack/.
Pre-flight checklist
Section titled “Pre-flight checklist”-
npm run buildcompletes with no broken-link warnings. -
npm run previewrenders correctly and search returns results. -
bunx playwright test(or your equivalent) passes the theme, search, and accessibility checks.