File tree Expand file tree Collapse file tree 3 files changed +59
-54
lines changed Expand file tree Collapse file tree 3 files changed +59
-54
lines changed Original file line number Diff line number Diff line change 1212 "allowlist": {
1313 "allow": [
1414 "->",
15- ">="
15+ ">=",
16+ "<<<"
1617 ]
1718 },
1819 "comments": true
Original file line number Diff line number Diff line change 1+ # Imported in static-deploy.md
2+ # This file is extracted as a separate file so that renovate can update the action versions
3+ #
4+ # region content
5+ # Simple workflow for deploying static content to GitHub Pages
6+ name : Deploy static content to Pages
7+
8+ on :
9+ # Runs on pushes targeting the default branch
10+ push :
11+ branches : ['main']
12+
13+ # Allows you to run this workflow manually from the Actions tab
14+ workflow_dispatch :
15+
16+ # Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages
17+ permissions :
18+ contents : read
19+ pages : write
20+ id-token : write
21+
22+ # Allow one concurrent deployment
23+ concurrency :
24+ group : ' pages'
25+ cancel-in-progress : true
26+
27+ jobs :
28+ # Single deploy job since we're just deploying
29+ deploy :
30+ environment :
31+ name : github-pages
32+ url : ${{ steps.deployment.outputs.page_url }}
33+ runs-on : ubuntu-latest
34+ steps :
35+ - name : Checkout
36+ uses : actions/checkout@v4
37+ - name : Set up Node
38+ uses : actions/setup-node@v4
39+ with :
40+ node-version : lts/*
41+ cache : ' npm'
42+ - name : Install dependencies
43+ run : npm ci
44+ - name : Build
45+ run : npm run build
46+ - name : Setup Pages
47+ uses : actions/configure-pages@v4
48+ - name : Upload artifact
49+ uses : actions/upload-pages-artifact@v3
50+ with :
51+ # Upload dist folder
52+ path : ' ./dist'
53+ - name : Deploy to GitHub Pages
54+ id : deployment
55+ uses : actions/deploy-pages@v4
56+ # endregion content
Original file line number Diff line number Diff line change @@ -63,59 +63,7 @@ $ npm run preview
6363
64642 . リポジトリー設定ページにある GitHub Pages の設定から、デプロイ元を "GitHub Actions" にすることで、プロジェクトをビルドしてデプロイするワークフローを作成できます。npm を使用して依存関係をインストールし、ビルドするサンプルワークフローが提供されています:
6565
66- ``` yml
67- # 静的コンテンツを GitHub Pages にデプロイするためのシンプルなワークフロー
68- name : Deploy static content to Pages
69-
70- on :
71- # デフォルトブランチを対象としたプッシュ時にで実行されます
72- push :
73- branches : ['main']
74-
75- # Actions タブから手動でワークフローを実行できるようにします
76- workflow_dispatch :
77-
78- # GITHUB_TOKEN のパーミッションを設定し、GitHub Pages へのデプロイを許可します
79- permissions :
80- contents : read
81- pages : write
82- id-token : write
83-
84- # 1 つの同時デプロイメントを可能にする
85- concurrency :
86- group : ' pages'
87- cancel-in-progress : true
88-
89- jobs :
90- # デプロイするだけなので、単一のデプロイジョブ
91- deploy :
92- environment :
93- name : github-pages
94- url : ${{ steps.deployment.outputs.page_url }}
95- runs-on : ubuntu-latest
96- steps :
97- - name : Checkout
98- uses : actions/checkout@v4
99- - name : Set up Node
100- uses : actions/setup-node@v4
101- with :
102- node-version : lts/*
103- cache : ' npm'
104- - name : Install dependencies
105- run : npm ci
106- - name : Build
107- run : npm run build
108- - name : Setup Pages
109- uses : actions/configure-pages@v4
110- - name : Upload artifact
111- uses : actions/upload-pages-artifact@v3
112- with :
113- # dist フォルダーのアップロード
114- path : ' ./dist'
115- - name : Deploy to GitHub Pages
116- id : deployment
117- uses : actions/deploy-pages@v4
118- ` ` `
66+ <<< ./static-deploy-github-pages.yaml#content
11967
12068## GitLab Pages と GitLab CI
12169
You can’t perform that action at this time.
0 commit comments