Skip to content

将你的 Astro 站点部署到 Surge

你可以将 Astro 项目部署到 Surge,这是一个专为前端开发者设计的单命令 Web 发布平台。

¥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 globally from the terminal, if you haven’t already.

    终端窗口
    npm install -g surge
  2. Build your Astro site from your project’s root directory.

    终端窗口
    npm run build
  3. Deploy to Surge using the CLI.

    终端窗口
    surge dist

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

更多部署指南

Astro 中文网 - 粤ICP备13048890号