Deploy to Netlify
This guide walks you through deploying your Photography Portfolio to Netlify, the default deployment platform for this template.
Why Netlify?
- Pre-configured adapter
- Automatic SSL certificates
- Continuous deployment from Git
- Built-in form handling
- Generous free tier
Prerequisites
- A Netlify account
- Your project pushed to a Git repository (GitHub, GitLab, or Bitbucket)
- Node.js 18 or higher
Deployment Steps
1. Connect Your Repository
- Log in to Netlify
- Click “Add new site” → “Import an existing project”
- Connect to your Git provider
- Select your photography portfolio repository
2. Configure Build Settings
Netlify should auto-detect these settings, but verify they match:
3. Set Environment Variables
In Netlify dashboard:
- Go to Site settings → Environment variables
- Add your
.env
variables:
4. Deploy
- Click “Deploy site”
- Wait for the initial build to complete
- Your site will be live at
[your-site-name].netlify.app
Custom Domain (Optional)
To add your custom domain:
- Go to Site settings → Domain management
- Click “Add custom domain”
- Follow Netlify’s DNS configuration instructions
Continuous Deployment
Netlify automatically:
- Deploys when you push to your main branch
- Creates preview deployments for pull requests
- Handles SSL certificate renewal
Troubleshooting
Build Failures
- Check your Node.js version in
package.json
- Verify all dependencies are installed
- Review build logs in Netlify dashboard
Runtime Errors
- Ensure environment variables are set correctly
- Check Sanity project permissions
- Verify SSR configuration in
astro.config.mjs
Join our Telegram support group here.