Astro

Astro uygulamanı deploy et

Astro ships static HTML by default — you only reach for a server adapter if you opt into one. For a default project, npm run build is already producing exactly what this host wants.

steps
  1. 01

    Build the site

    Run "npm run build" (or "astro build" directly). Astro pre-renders every page to static HTML in a "dist" folder, plus a hashed, cacheable "_astro" assets folder.

  2. 02

    Confirm you haven't added a server adapter

    If astro.config.mjs sets "output: 'server'" or "'hybrid'" with an adapter (Node, Vercel, Cloudflare…), some routes render on request and won't exist as files. The default, adapter-free config is fully static.

  3. 03

    Deploy et

    Proje kök dizininden "npx harvis deploy dist" çalıştır. Bu ilk deploy için yapılandırma ve giriş gerekmez — hemen canlı bir URL alırsın, ayrıca hazır olduğunda siteyi ücretsiz bir hesaba bağlamak için özel bir claim bağlantısı.

Astro'i tek komutla deploy et

Projeni derle, ardından çıktı klasörünü harvis'e ver. İlk deploy için hesap gerekmez — canlı bir bağlantı ve daha sonra yönetmek için özel bir claim bağlantısı alırsın.

terminal
npm run build
npx harvis deploy dist

Terminal yerine dosyaları sürüklemeyi mi tercih edersin? Projeni derle, ardından çıktı klasörünü buraya bırak ve aynı şekilde yayınla.

git hook

Deploy Astro on every git push

The command above is one you will run again after every change. A git hook runs it for you: this one already points at dist, the folder Astro builds into.

The folder holding the finished site. "." is the repo root, which is right for hand-written HTML; a static-site generator writes somewhere else.

pre-push fires on every branch and every remote, so a feature branch would publish over your live site. With this on, a push from anywhere else exits early and goes through untouched.

in your repo root
cat > .git/hooks/pre-push <<'EOF'
#!/bin/sh
set -e
npm run build
harvis deploy dist
EOF
chmod +x .git/hooks/pre-push

The options, the gotchas and how to share a hook with your team are on the git hook page.

Astro deploy soruları

I'm using Astro islands with React or Vue components. Does that still work?

Yes — islands hydrate in the browser after the static HTML loads, so they don't need a server at request time. The framework code ships as regular JavaScript in the dist folder like any other asset.

What if I need server-rendered routes for one page?

Static hosting can't run per-request server code, full stop. Either keep that route external (calling your own API from client-side JS is fine) or split it out and host it somewhere that runs a server — the rest of the Astro site can still live here.

Bir Astro uygulamasını harvis'e deploy etmek gerçekten ücretsiz mi?

Evet, kart gerekmez. Ücretsiz limitler site başına 500 dosya ve 50 MB'dır, bu da statik bir Astro build'i için bol bol yer bırakır. Yayınlanan siteler süresi dolmaz — sen silene kadar yayında kalırlar.

Deploy edilen Astro sitesinde kendi alan adımı kullanabilir miyim?

Her site ücretsiz bir harvis.page adresi alır ve claim ettikten sonra panondan kendi alt alan adını seçebilirsin — rastgele biri yerine my-app.harvis.page gibi. Zaten sahip olduğun bir alan adını (mystore.com gibi) siteye yönlendirmek henüz desteklenmiyor.

Bunun Astro'i Vercel veya Netlify'a deploy etmekten farkı ne?

Vercel ve Netlify, bir Git reposunu bağlamak ve build'ini onların sunucularında çalıştırmak üzerine kuruludur, yapılandırmak için de bir panoya sahiptirler. harvis bunların hepsini atlar: yerelde (ya da kendi CI'nda) derlersin, çıktı klasörüne karşı tek bir CLI komutu çalıştırırsın ve bir bağlantı alırsın — proje kurulumu yok, siteyi saklamak isteyene kadar hesap da yok.

other frameworks

Başka bir şey mi deploy ediyorsun?

Tarif her yerde aynı — derle, ardından npx harvis deploy ile çıktıyı yayınla.