Publishing Workflow

OmarCMS uses git for publishing. Write, commit, push - that's it.

Local Development

Start the dev server to preview your changes:

pnpm dev

Make changes, refresh your browser, repeat.

Publishing a New Post

Once you're happy with your post:

# Add the new file
git add src/content/blog/my-post.md

# Commit with a clear message
git commit -m "New post: My Post Title"

# Push to GitHub
git push

# Auto-deploys via Vercel

Deployment Setup

First-time deployment to Vercel:

  1. Push your OmarCMS repo to GitHub
  2. Go to vercel.com
  3. Click "New Project"
  4. Import your GitHub repository
  5. Vercel auto-detects Astro - just click "Deploy"
  6. Point your domain to Vercel (optional)

Auto-Deployment

After initial setup, every push to your main branch triggers a new deployment. Vercel builds your site and deploys it automatically.

Typical deployment time: 30-60 seconds.

Build Command

If Vercel doesn't auto-detect Astro, use:

  • Build Command: pnpm build
  • Output Directory: dist
  • Install Command: pnpm install

Environment Variables

If you add analytics or other integrations that need API keys, add them in Vercel's dashboard under Settings → Environment Variables.

Custom Domain

To use your own domain:

  1. Go to your Vercel project settings
  2. Click "Domains"
  3. Add your domain
  4. Update your DNS records (Vercel provides instructions)
  5. Wait for DNS propagation (~5-30 minutes)

Next Steps