Deploy Guide

Zero to live on free infrastructure. These are the exact steps.

Zero to live on free infrastructure. These are the exact steps.


Prerequisites


Step 1: Clone and install

git clone https://github.com/houdini1906-lgtm/sovereign-stack-skeleton.git my-platform
cd my-platform
npm install

This installs the four dependencies. Nothing else.


Step 2: Verify locally

npm run dev

Open http://localhost:4321 in your browser. You should see the homepage with the two example posts. The draft post (“Your First Post”) will also appear in dev mode.

npm run build

This builds the static site to dist/. Verify the draft post is NOT in the output:

ls dist/posts/

You should see welcome/ and how-this-works/ but NOT your-first-post/. That is the draft gate working.


Step 3: Create your GitHub repo

  1. Go to github.com and create a new repository (private or public, your choice).
  2. Remove the existing remote and add your own:
git remote remove origin
git remote add origin https://github.com/YOUR-USERNAME/YOUR-REPO-NAME.git
git branch -M main
git push -u origin main

You now own the repo. The code is yours.


Step 4: Deploy to Netlify

  1. Go to app.netlify.com and sign in.
  2. Click “Add new site” then “Import an existing project.”
  3. Connect your GitHub account and select your repository.
  4. Netlify will auto-detect the Astro project. Verify these settings:
    • Build command: npm run build
    • Publish directory: dist
    • Node version: set NODE_VERSION to 22 in the environment variables.
  5. Click “Deploy site.”

Netlify will build and deploy your site. You will get a URL like your-site-name.netlify.app.


Step 5: Point your domain (optional)

If you have a custom domain:

  1. In Netlify, go to “Domain management” and click “Add a domain.”
  2. Enter your domain name.
  3. Netlify will provide DNS records. Add them to your domain registrar.
  4. Update astro.config.mjs to use your domain:
export default defineConfig({
  site: 'https://your-domain.com',
  integrations: [mdx(), sitemap()],
});
  1. Commit, push, and Netlify will redeploy automatically.

Step 6: Verify the live site

After deployment:

  1. Visit your site URL. Confirm the homepage loads with the two published posts.
  2. Visit /rss.xml. Confirm the feed contains the two published posts and no drafts.
  3. Check that clicking a post takes you to the full post page.

Your sovereign platform is live.


Continuous deployment

Every time you push to main, Netlify rebuilds and redeploys automatically. Your workflow:

  1. Write a new post in src/content/posts/.
  2. Set status: draft and preview with npm run dev.
  3. When ready, change to status: published.
  4. Commit and push. Netlify deploys the update.

No CMS. No dashboard. Git is your publishing pipeline.