Hosting

Astro Hosting for Static Sites, Git Deploy

Host a static Astro site on VeloxaHost: build with astro build in CI, deploy dist from Git to a Static site with free HTTPS, gzip and a CI webhook.

Astro builds static HTML by default, and a VeloxaHost Static site serves exactly that: files from a web root, over HTTPS on your domain, with gzip compression and a free Let's Encrypt certificate. There is no server process to run or keep alive, so a static Astro site needs less setup than any other kind of site you can host here.

What the Static site does not do is build. A Git deploy copies files into the web root and stops. So you run astro build somewhere else, usually in CI, and deploy its output. This page covers Astro's static output (output: 'static', the default). On-demand rendering needs a server adapter and is not covered here.

Deploy from Git

How a Static site deploys

The Deploy from Git card takes a public Repository URL (https), a Branch and an optional Subdirectory. A deploy makes a shallow clone of the branch and replaces everything in /var/www/html with the repository, or with just the subdirectory when you set one. Astro writes its build to dist/, so there are two ways to get it there:

  • Commit the build. Run npm run build locally, commit dist/, and set Subdirectory to dist. Simple, but every content change means a rebuild and a commit.
  • Build in CI and publish a branch (below). The branch holds only built files; the site deploys it.

A worked deploy with GitHub Actions

  1. In the console, open Websites, click Add Website, enter your domain and pick Static under Hosting type. Click Create Website.

  2. Add the DNS records shown under DNS — point your domain here. HTTPS is issued once they resolve.

  3. In astro.config.mjs, set site: "https://example.com" so sitemaps and canonical URLs use your domain.

  4. Add this workflow as .github/workflows/deploy.yml. It builds on every push to main, puts the output in a site/ folder on a deploy branch, and calls the site's webhook:

    name: Deploy
    on:
      push:
        branches: [main]
    permissions:
      contents: write
    jobs:
      deploy:
        runs-on: ubuntu-latest
        steps:
          - uses: actions/checkout@v4
          - uses: actions/setup-node@v4
            with:
              node-version: 22
          - run: npm ci
          - run: npm run build
          - name: Publish the build to the deploy branch
            run: |
              mkdir publish && mv dist publish/site && cd publish
              git init -b deploy
              git add -A
              git -c user.name=ci -c user.email=ci@example.com commit -m "Build $GITHUB_SHA"
              git push -f "https://x-access-token:$GH_TOKEN@github.com/$GITHUB_REPOSITORY.git" deploy
            env:
              GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          - name: Deploy to VeloxaHost
            run: curl -fsS -X POST "$VELOXAHOST_DEPLOY_HOOK"
            env:
              VELOXAHOST_DEPLOY_HOOK: ${{ secrets.VELOXAHOST_DEPLOY_HOOK }}
    
  5. Push once so the deploy branch exists. Then, on the site's page, open Deploy from Git, click Deploy, enter the repository URL, set Branch to deploy and Subdirectory to site, leave Auto-deploy on Manual / webhook only, and click Deploy Now.

  6. Copy the CI Webhook URL that now appears in the card into the repository's secrets as VELOXAHOST_DEPLOY_HOOK. From then on, each push to main builds and deploys.

The site/ folder keeps the build separate from the branch's Git data, so only built files reach the web root.

Supported versions

Component Version
Astro Any version with static output; the build runs in your CI
Node.js Whatever your CI uses; Astro 7 needs Node.js 22.22 or newer

Because the site only serves files, the Astro version is up to you. Pin Node.js in CI to a version your Astro release supports.

Which plan fits

A static site uses almost no CPU or memory, so Launch ($6.99/month, 3 websites, 20 GB NVMe) is enough for most Astro sites, with 5 GB of disk per site. Running many sites for clients? Grow ($12.99/month) gives 10 websites and Scale ($24.99/month) 25, with 2 GB of disk per site on Scale. Yearly billing is ten times the monthly price. See pricing.

Limits and when to use a VPS

  • No build on the server. Build in CI or locally.
  • Missing pages fall back to index.html. A Static site answers any path without a file with your home page, which suits single-page apps. It does not serve Astro's 404.html for unknown URLs, so keep your links accurate when you move pages.
  • No redirects or headers config. Files are served as they are.
  • Public repositories only.
  • Server features. Astro's on-demand rendering, actions and on-demand endpoints need a running server. Use a VPS, or start from the Node.js (Docker) app.

Content from a headless CMS works well with static builds; run Strapi or Directus on a VPS and rebuild from CI. Other generators deploy the same way: see static site hosting, and Next.js hosting for a static export.

FAQ

Does VeloxaHost run the Astro build?

No. A Static site deploys files as they are in the branch. Build in CI and publish the output, as in the workflow above, or commit dist/.

Do Astro's clean URLs work?

Yes. Astro's default build.format is directory, so /about builds to /about/index.html, which the site serves for both /about and /about/.

Why is my 404 page not shown?

Unknown paths return index.html, so visitors see the home page. This is how Static sites handle single-page apps today.

Can I deploy on a schedule?

Yes. Set Auto-deploy to Every hour or Every day to redeploy the saved branch. It does not rebuild; schedule your CI for that.

Is HTTPS included?

Yes. Each site gets a free Let's Encrypt certificate once its DNS records resolve, and responses are gzip-compressed.

Astro sites run on any managed hosting plan, from Launch at $6.99/month. Framework facts were checked on 2026-10-18 against: docs.astro.build/en/install-and-setup, docs.astro.build/en/guides/deploy, docs.astro.build/en/reference/configuration-reference, registry.npmjs.org/astro/latest.

Ready to deploy?

Start a free trial, or compare plans to match your team's scale.