title | description | type | i18nReady |
---|---|---|---|
EdgioにAstroサイトをデプロイする |
Edgioを使ってAstroサイトをデプロイする方法。 |
deploy |
true |
import { Steps } from '@astrojs/starlight/components';
WebサイトやAPIをデプロイ、保護、高速化するエッジおよびCDNプラットフォームであるEdgioに、Astroプロジェクトをデプロイできます。
:::tip EdgioのドキュメントにあるAstroガイドをご覧ください。 :::
1. [Edgio CLI](https://docs.edg.io/guides/cli)をインストールしていない場合は、ターミナルからグローバルにインストールします。```bash
npm install -g @edgio/cli
```
-
AstroサイトにEdgioを追加します。
edgio init
-
(オプション)サーバーサイドレンダリングを有効にします。
Astroに@astrojs/nodeを設定した後、
edgio.config.js
に以下のようにサーバーファイルのパスを指定します。// edgio.config.js import { join } from 'path' module.exports = { astro: { // Astro SSRを実行するスタンドアロンサーバーのパス。 // このファイルの依存関係は自動的にバンドルされます。 appPath: join(process.cwd(), 'dist', 'server', 'entry.mjs'), }, };
-
Edgioにデプロイします。
edgio deploy