Verify your domain
Ensure your custom domain points correctly and SSL is active. Update the site property in astro.config.mjs to your production domain before building.
varsha generates a fully static site that can be deployed to any hosting platform that supports static files. The production build outputs to the dist/ directory.
Before deploying, create a production build:
npm run buildThis generates optimized static HTML, CSS, and JavaScript in dist/. To preview the build locally before deploying:
npm run previewVercel is the recommended platform for varsha sites. Since varsha uses static output, no adapter is needed — Vercel auto-detects Astro projects.
Install the Vercel CLI and deploy:
npm install -g vercelvercelFor production deployment:
vercel --prodnpm run builddistVercel automatically handles:
Install the Netlify CLI and deploy:
npm install -g netlify-clinetlify deployFor production:
netlify deploy --prodnpm run builddistCreate a netlify.toml file in your project root for consistent configuration:
[build] command = "npm run build" publish = "dist"
[[redirects]] from = "/*" to = "/index.html" status = 200npm run builddistCloudflare Pages also supports preview deployments and custom domains.
.github/workflows/deploy.yml:name: Deploy to GitHub Pages
on: push: branches: [main] workflow_dispatch:
permissions: contents: read pages: write id-token: write
jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: 20 - run: npm install - run: npm run build - uses: actions/upload-pages-artifact@v3 with: path: ./dist
deploy: needs: build runs-on: ubuntu-latest environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} steps: - id: deployment uses: actions/deploy-pages@v4astro.config.mjs to set the correct site URL for GitHub Pages:export default defineConfig({ site: 'https://your-username.github.io', base: '/your-repo-name', // Omit this if deploying to a custom domain // ...});varsha works with any static hosting provider. The general steps are:
npm run builddist/ to your hostCompatible platforms include:
npx surge distfirebase deploy with dist/ as the public directorydist/ to an S3 bucket with static website hosting enableddist/ as the web rootdist/varsha does not require any environment variables for basic operation. If you add integrations that require API keys or secrets (e.g., analytics, CMS), create a .env file:
PUBLIC_ANALYTICS_ID=your-analytics-idVariables prefixed with PUBLIC_ are available in client-side code. Never commit .env files containing secrets to version control. Add .env to .gitignore.
After deploying to production:
Verify your domain
Ensure your custom domain points correctly and SSL is active. Update the site property in astro.config.mjs to your production domain before building.
Test all pages
Visit key pages (home, docs, blog) to confirm they render correctly in production.
Check SEO tags
Use Google’s Rich Results Test or social media debuggers to verify OG tags render correctly.
Submit sitemap
Submit your sitemap-index.xml (generated automatically by @astrojs/sitemap) to Google Search Console.
Test themes
Switch between themes using the / key to ensure all palettes render correctly in the production build.
Verify attribution
Confirm the “Built with varsha by myndlabs” credit appears on all pages.
For the best experience, connect your Git repository to your hosting platform. This enables:
main triggers a production deploy