← Back

Deploying Event Horizon

·4 min read·Event Horizon

Step-by-step instructions to deploy your Event Horizon blog to Vercel, Netlify, GitHub Pages, Cloudflare Pages, or your own server.

Deploying Event Horizon

Event Horizon exports as a fully static site. Once you run npm run build, the out/ folder contains everything — HTML, CSS, JS, images. You can host it anywhere that serves static files.

Before You Deploy

Make sure the site builds without errors:

bash
npm install
npm run build

If the build succeeds, you'll see an out/ folder. That's your site.

Also update config/site.ts with your real domain before deploying:

ts
url: 'https://yourdomain.com',
domain: 'yourdomain.com',

This ensures the sitemap, RSS feed, OG tags, and canonical URLs all point to the right place.

Vercel is made by the Next.js team. It's the easiest option and gives the best performance.

1. Push your code to GitHub 2. Go to vercel.com and sign up with GitHub 3. Click Add New Project → import your repository 4. Set the build settings: - Framework: Next.js - Build Command: npm run build - Output Directory: out 5. Click Deploy

Your site is live at https://your-repo.vercel.app. To add a custom domain, go to Project Settings → Domains.

Vercel rebuilds and redeploys automatically every time you push to main.

Option 2 — Netlify

Drag & Drop (Quickest)

1. Run npm run build 2. Go to app.netlify.com 3. Drag and drop the out/ folder onto the deploy area 4. Done — your site is live instantly

1. Go to app.netlify.comAdd new siteImport an existing project 2. Connect your GitHub repository 3. Set the build settings: - Build command: npm run build - Publish directory: out 4. Click Deploy

Netlify rebuilds on every push. Add a custom domain under Site Settings → Domain Management.

Option 3 — GitHub Pages

Automatic with GitHub Actions

1. Create a GitHub repository and push your code:

bash
git init
git add .
git commit -m "Initial commit"
git branch -M main
git remote add origin https://github.com/YOUR_USERNAME/my-blog.git
git push -u origin main

2. Go to Repository Settings → Pages 3. Set Source to Deploy from a branch, branch to gh-pages, folder to / (root) 4. GitHub Actions will build and deploy automatically on every push to main

Your site will be live at https://YOUR_USERNAME.github.io/my-blog/

Custom Domain for GitHub Pages

Add a CNAME file to public/ with your domain:


yourdomain.com

Then in GitHub: Settings → Pages → Custom domain → enter your domain → check Enforce HTTPS.

Point your DNS to GitHub Pages:


A  @  185.199.108.153
A  @  185.199.109.153
A  @  185.199.110.153
A  @  185.199.111.153

Option 4 — Cloudflare Pages

1. Go to pages.cloudflare.com 2. Click Create a project → connect your GitHub repository 3. Set the build settings: - Framework: Next.js - Build command: npm run build - Build output directory: out 4. Click Save and Deploy

Your site is live at https://your-project.pages.dev. Add a custom domain in the Custom Domains section.

Option 5 — Self-Hosted (VPS / Nginx)

1. Build the site:

bash
npm run build

2. Upload the out/ folder to your server:

bash
scp -r out/* user@your-server.com:/var/www/yourdomain.com/

3. Configure Nginx:

nginx
server {
    listen 80;
    server_name yourdomain.com www.yourdomain.com;
    root /var/www/yourdomain.com;
    index index.html;

location / { try_files $uri $uri/ =404; }

error_page 404 /404.html; }

4. Add HTTPS with Let's Encrypt:

bash
sudo certbot --nginx -d yourdomain.com -d www.yourdomain.com

DNS Quick Reference

Vercel / Netlify:


CNAME  www  your-project.vercel.app
CNAME  @    your-project.vercel.app

Cloudflare Pages:


CNAME  @    your-project.pages.dev
CNAME  www  your-project.pages.dev

GitHub Pages:


A  @  185.199.108.153
A  @  185.199.109.153
A  @  185.199.110.153
A  @  185.199.111.153

SSL / HTTPS

| Platform | SSL | |---|---| | Vercel | Automatic | | Netlify | Automatic | | GitHub Pages | Automatic | | Cloudflare Pages | Automatic | | Self-hosted | Use Let's Encrypt (certbot) |

Troubleshooting

Build fails

bash
rm -rf .next out
npm install
npm run build

404 errors after deploy

- Confirm the out/ directory is what's being served, not the repo root - Test locally: npx serve out

Custom domain not working

- DNS changes can take up to 48 hours to propagate - Check with nslookup yourdomain.com

HTTPS not working

- Wait 5–30 minutes for the SSL certificate to provision - Try in an incognito window to rule out browser cache

Your Name

Your Name

Writer and developer sharing thoughts on technology, programming, and the web.

Newsletter

Stay in the loop

Get new posts delivered straight to your inbox. No spam, unsubscribe anytime.

Add your Beehiiv form ID to config/site.ts to enable the newsletter form.

Related Posts