title | description | type | i18nReady |
---|---|---|---|
Deploy your Astro Site to Surge |
How to deploy your Astro site to the web using surge.sh |
deploy |
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 when deploying by running
surge dist yourdomain.com
.