Repository navigation
Deploying to Netlify
StarryBio deploys to Netlify as a static Astro site. The committed netlify.toml runs the canonical production build and publishes dist/; Netlify reads the resulting dist/_headers file for the shared security and cache policy. No Netlify CLI, Astro adapter, Function, or runtime service is needed.
- A configured StarryBio repository on a Git provider connected to Netlify.
- A Netlify account with permission to create a project.
- Your content changes committed in
config/starrybio.config.tsand any local assets inpublic/.
The repository root contains .node-version with 24, packageManager: "pnpm@12.3.4", and pnpm-lock.yaml. Netlify uses the base-directory .node-version before a UI Node selection and recognizes pnpm-lock.yaml; Corepack uses the exact pnpm version declared by packageManager. The stock site has no application build-time or runtime environment variables. Do not set NODE_ENV=production: Netlify would omit the development dependencies needed to run Astro and the build scripts.
The README Deploy to Netlify button is only a shortcut to Netlify’s repository-import flow. It does not publish a prebuilt dist/ folder or replace source control. Fork or create your own repository first when you want to keep configuration changes.
-
Push the configured repository to your Git provider.
-
In Netlify, open the team’s Projects page, choose Add new project > Import an existing project, choose the Git provider, and select the repository.
-
Keep the Base directory empty so Netlify builds from the repository root. Confirm the configuration before deploying:
Setting Exact value Base directory repository root (empty) Build command pnpm buildPublish directory distNode.js 24from.node-versionPackage manager pnpm 12.3.4frompackageManagerApplication environment variables none The committed
netlify.tomlis authoritative for the build command and publish directory; current Netlify file-based configuration takes precedence over the corresponding dashboard values. Edit the committed file if this project’s build contract changes, rather than relying on an uncommitted dashboard setting. -
Select Deploy. Open the assigned
*.netlify.appproduction URL when the build completes. -
Check the homepage, a local asset, a deliberately unknown path, every enabled generated download, and the browser console.
Astro emits dist/404.html; Netlify uses that static page for unmatched paths without an SPA redirect. Astro copies public/_headers to dist/_headers, which Netlify applies as the CSP, browser-security headers, and cache rules. Do not add a catch-all rewrite to index.html: it would hide the custom 404 page.
The production branch selected during import (normally main) deploys each new push. On supported Git workflows, pull requests receive Deploy Previews; they are previews, not the production URL.
For a routine StarryBio update:
- Edit
config/starrybio.config.ts,public/, or source files. - Run
pnpm validate,pnpm build, andpnpm previewlocally when possible. - Commit and push the change to the production branch.
- Review the Netlify build log and test the new production deploy.
A dashboard rebuild is useful only when the source revision is already correct. It cannot incorporate uncommitted local configuration. If a build uses the wrong directory or package manager, first confirm that the connected repository is the intended one and that its root contains netlify.toml, .node-version, package.json, and pnpm-lock.yaml.
- Open the Netlify project and choose Domain management in the left sidebar.
- Choose Add a domain > Add a domain you already own.
- Enter the exact hostname, such as
links.example.comorexample.com, then follow the prompt to use Netlify DNS or an External DNS Provider. - If DNS stays with another provider, open Domain management > Production domains, select Pending DNS verification beside the domain, and use the record values Netlify displays. Do not guess or copy a record from a different project.
- After Netlify reports that the domain is active and HTTPS is ready, update
seo.canonicalUrlandqr.urlto the exacthttps://canonical URL, commit, and push.
Choose one primary hostname and configure any www/apex or old-domain redirect in Netlify’s domain controls. StarryBio is a static site; it does not perform host redirects in application code.
Confirm the repository root is the Base directory and that the committed pnpm-lock.yaml, package.json, .node-version, and netlify.toml are present in it. Netlify detects pnpm from the lockfile, .node-version overrides its Node UI setting, and netlify.toml supplies pnpm build and dist.
Remove any SPA catch-all redirect. Keep src/pages/404.astro, verify pnpm build emits dist/404.html, and deploy the new build.
Confirm the build output contains dist/_headers. Netlify reads that file only from the published output; a _headers file outside dist/ is not deployed. Run pnpm headers after changing analytics, as described in Security and Privacy.
For current provider details, consult Netlify’s project import guide, Astro build settings, dependency management, file-based configuration, and custom-domain guide. Astro’s general deployment guide confirms the static dist output contract.
StarryBio · 🏠 Home · ✨ Configure · 🚀 Deploy · 🩺 Troubleshoot · 🛠 Developer guide
Static link-in-bio setup, operation, and development guides.
- Configuration Reference
- Managing Content
- Appearance and Branding
- Availability and Announcements
- Assets and Generated Downloads
- SEO and Analytics