File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -55,13 +55,25 @@ $ npm run preview
5555
5656## GitHub Pages
5757
58- 1 . ` vite.config.js ` で ` base ` を正しく設定してください。
58+ 1 . ** Vite の設定を更新**
59+
60+ ` vite.config.js ` で ` base ` を正しく設定してください。
5961
6062 ` https://<USERNAME>.github.io/ ` や、GitHub Pages 経由のカスタムドメイン(例 ` www.example.com ` )にデプロイする場合、` base ` を ` '/' ` に設定します。デフォルトは ` '/' ` なので、設定から ` base ` を削除することもできます。
6163
6264 ` https://<USERNAME>.github.io/<REPO>/ ` にデプロイする場合(例: リポジトリーは ` https://github.com/<USERNAME>/<REPO> ` )、` base ` を ` '/<REPO>/' ` と設定してください。
6365
64- 2 . リポジトリー設定ページにある GitHub Pages の設定から、デプロイ元を "GitHub Actions" にすることで、プロジェクトをビルドしてデプロイするワークフローを作成できます。npm を使用して依存関係をインストールし、ビルドするサンプルワークフローが提供されています:
66+ 2 . ** GitHub Pages を有効化**
67+
68+ リポジトリーで ** Settings → Pages** に移動します。** Build and deployment** の下にある ** Source** ドロップダウンを開き、** GitHub Actions** を選択します。
69+
70+ Vite はデプロイにビルドステップが必要なため、GitHub は GitHub Actions の [ ワークフロー] ( https://docs.github.com/ja/actions/about-github-actions/understanding-github-actions ) を使用してサイトをデプロイするようになります。
71+
72+ 3 . ** ワークフローを作成**
73+
74+ リポジトリーの ` .github/workflows/deploy.yml ` に新しいファイルを作成します。前のステップから ** "create your own"** をクリックすることもでき、その場合はスターターワークフローファイルが生成されます。
75+
76+ 以下は、npm で依存関係をインストールし、サイトをビルドして、` main ` ブランチに変更をプッシュするたびにデプロイするサンプルワークフローです:
6577
6678 <<< ./static-deploy-github-pages.yaml#content[ .github/workflows/deploy.yml]
6779
You can’t perform that action at this time.
0 commit comments