| title | Deploy your Astro Site to Surge | ||
|---|---|---|---|
| description | How to deploy your Astro site to the web using Surge | ||
| sidebar |
|
||
| type | deploy | ||
| logo | surge | ||
| supports |
|
||
| i18nReady | true |
import { Steps } from '@astrojs/starlight/components';
You can deploy your Astro project to Surge, a single-command web publishing platform designed for front-end developers.
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
```
-
Build your Astro site from your project’s root directory.
npm run build
-
Deploy to Surge using the CLI.
surge dist
You can use a custom domain with Surge when deploying by running
surge dist yourdomain.com.