Skip to content

astro

Deploy your Astro Site to Surge

Astro

Deploy your Astro Site to Surge

Deploy your Astro Site to Surge

You can deploy your Astro project to Surge, a single-command web publishing platform designed for front-end developers.

How to deploy

1. Install [the Surge CLI](https://www.npmjs.com/package/surge) globally from the terminal, if you haven't already.
```shell
npm install -g surge
```
  1. Build your Astro site from your project’s root directory.

    npm run build
  2. Deploy to Surge using the CLI.

    surge dist

    You can use a custom domain with Surge when deploying by running surge dist yourdomain.com.