-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (34 loc) · 1.22 KB
/
build-docs.yml
File metadata and controls
43 lines (34 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Deploy MkDocs
on:
push:
branches: [main] # main ブランチへの push で自動実行
workflow_dispatch: # 手動実行も可
jobs:
build-and-deploy:
runs-on: ubuntu-latest
permissions:
contents: write # リポジトリへの push を許可
steps:
# リポジトリ取得
- uses: actions/checkout@v4
with:
fetch-depth: 1
# uv + Python をセットアップ
- uses: astral-sh/setup-uv@v5
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: uv sync
- name: Check verify staleness
run: uv run python scripts/verify_status.py check || echo "::warning::Some verify codes are stale"
# ドキュメントをビルド
- name: Build site
run: uv run mkdocs build --clean
# gh-pages ブランチへデプロイ
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }} # リポジトリ自動付与の token
publish_dir: ./site # デフォルトの出力先ディレクトリ
publish_branch: gh-pages