Skip to content

Commit cc22874

Browse files
committed
GitHub Pages デプロイ用 Actions を最新版に更新
- configure-pages v3 → v5 - upload-pages-artifact v1 → v3 - deploy-pages v2 → v4 (旧 upload-artifact v3 廃止対応)
1 parent 992d7d7 commit cc22874

1 file changed

Lines changed: 15 additions & 19 deletions

File tree

.github/workflows/static.yml

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,21 @@
22
name: Deploy static content to Pages
33

44
on:
5-
# Runs on pushes targeting the default branch
65
push:
76
branches: ["main"]
8-
9-
# Allows you to run this workflow manually from the Actions tab
107
workflow_dispatch:
118

12-
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
139
permissions:
10+
actions: read # ← v4のdeploy-pagesで必須
1411
contents: read
1512
pages: write
1613
id-token: write
1714

18-
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
19-
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
2015
concurrency:
2116
group: "pages"
2217
cancel-in-progress: false
2318

2419
env:
25-
# Setting an environment variable with the value of a configuration variable
2620
NEXT_PUBLIC_BASE_PATH: ${{ vars.BASE_PATH }}
2721

2822
jobs:
@@ -32,26 +26,28 @@ jobs:
3226
url: ${{ steps.deployment.outputs.page_url }}
3327
runs-on: ubuntu-latest
3428
steps:
35-
# Node.jsの準備
36-
- uses: actions/checkout@v3
29+
- uses: actions/checkout@v4
30+
3731
- name: Use Node.js v20
38-
uses: actions/setup-node@v3
32+
uses: actions/setup-node@v4
3933
with:
4034
node-version: 20
41-
cache: "npm"
42-
# インストール
35+
cache: npm
36+
4337
- run: npm ci
44-
# ビルド
4538
- run: npm run build --if-present
4639

47-
# デプロイ
40+
# GitHub Pages 用のメタ設定
4841
- name: Setup Pages
49-
uses: actions/configure-pages@v3
42+
uses: actions/configure-pages@v5
43+
44+
# アーティファクトをアップロード(Pages専用のやつ)
5045
- name: Upload artifact
51-
uses: actions/upload-pages-artifact@v1
46+
uses: actions/upload-pages-artifact@v3
5247
with:
53-
# Upload entire repository
54-
path: './out/'
48+
path: ./out/ # ← ビルド成果物のディレクトリに合わせて
49+
50+
# デプロイ
5551
- name: Deploy to GitHub Pages
5652
id: deployment
57-
uses: actions/deploy-pages@v2
53+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)