ដេប្លយកម្មវិធី Astro របស់អ្នក
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.
- 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.
- 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.
- 03
ដេប្លយវា
ដំណើរការ "npx harvis deploy dist" ពី root គម្រោងរបស់អ្នក។ មិនចាំបាច់ config និងមិនចាំបាច់ចូលសម្រាប់ deploy ដំបូងនេះទេ — អ្នកទទួលបាន URL ផ្ទាល់ភ្លាមៗ ព្រមទាំងតំណទាមទារឯកជនមួយ ដើម្បីភ្ជាប់គេហទំព័រទៅគណនីឥតគិតថ្លៃមួយនៅពេលណាដែលអ្នកត្រៀមខ្លួនរួចរាល់។
ដេប្លយ Astro ដោយពាក្យបញ្ជាតែមួយ
Build គម្រោងរបស់អ្នក រួចប្រគល់ថតលទ្ធផលទៅ harvis។ មិនចាំបាច់មានគណនីសម្រាប់ deploy ដំបូងទេ — អ្នកនឹងទទួលបានតំណភ្ជាប់ផ្ទាល់ និងតំណទាមទារឯកជនមួយ ដើម្បីគ្រប់គ្រងវានៅពេលក្រោយ។
npm run build npx harvis deploy dist
ចង់អូសឯកសារជំនួសឱ្យប្រើ terminal មែនទេ? Build គម្រោង រួច ទម្លាក់ថតលទ្ធផលនៅទីនេះ ហើយផ្សព្វផ្សាយវាតាមរបៀបដដែល។
សំណួរអំពីការដេប្លយ Astro
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.
តើការដេប្លយកម្មវិធី Astro ទៅ harvis ឥតគិតថ្លៃពិតប្រាកដមែនទេ?
បាន មិនចាំបាច់ប្រើកាតទេ។ ដែនកំណត់ឥតគិតថ្លៃគឺឯកសារ ៥០០ និង ៥០ MB ក្នុងមួយគេហទំព័រ ដែលគ្រប់គ្រាន់សម្រាប់ build Astro static ដោយមានទំហំគ្រប់គ្រាន់។ គេហទំព័រដែលបានផ្សព្វផ្សាយមិនផុតកំណត់ទេ — ពួកវានៅតែដំណើរការរហូតដល់អ្នកលុបពួកវាចេញ។
តើខ្ញុំអាចប្រើ domain ផ្ទាល់ខ្លួនរបស់ខ្ញុំជាមួយគេហទំព័រ Astro ដែលបានដេប្លយបានទេ?
គេហទំព័រនីមួយៗទទួលបានអាសយដ្ឋាន harvis.dev ឥតគិតថ្លៃមួយ ហើយអ្នកអាចជ្រើសរើស subdomain ផ្ទាល់ខ្លួនរបស់អ្នកពី dashboard បន្ទាប់ពីទាមទារវា — ដូចជា my-app.harvis.dev ជំនួសឱ្យអាសយដ្ឋានចៃដន្យ។ ការចង្អុល domain ដែលអ្នកមានស្រាប់ (ដូចជា mystore.com) ទៅកាន់គេហទំព័រនេះមិនទាន់អាចធ្វើបានទេនៅឡើយ។
តើវាខុសពីការដេប្លយ Astro ទៅ Vercel ឬ Netlify យ៉ាងដូចម្តេច?
Vercel និង Netlify ត្រូវបានបង្កើតឡើងជុំវិញការភ្ជាប់ Git repo និងដំណើរការ build របស់អ្នកនៅលើ server របស់ពួកគេ ជាមួយ dashboard មួយសម្រាប់កំណត់រចនាសម្ព័ន្ធ។ harvis រំលងអ្វីៗទាំងនោះទាំងអស់៖ អ្នក build នៅមូលដ្ឋាន (ឬនៅក្នុង CI ផ្ទាល់ខ្លួនរបស់អ្នក) ដំណើរការពាក្យបញ្ជា CLI តែមួយប្រឆាំងនឹងថតលទ្ធផល រួចទទួលបានតំណភ្ជាប់មួយ — មិនចាំបាច់រៀបចំគម្រោង និងមិនចាំបាច់មានគណនីទេ រហូតដល់អ្នកចង់រក្សាគេហទំព័រនោះ។
កំពុងដេប្លយអ្វីផ្សេងទៀតមែនទេ?
រូបមន្តដូចគ្នាគ្រប់ទីកន្លែង — build វា រួច npx harvis deploy លទ្ធផល។