GitHub Pages Actions Draft
このページは、GitHub Pages 用の GitHub Actions workflow draft を文書として保持するためのものです。
この phase では .github/workflows は作成しません。
以下は future draft であり、まだ active ではありません。
Intended Use
- MkDocs Material site を build する
- built artifact を GitHub Pages に deploy する
- private / internal access の前提確認後にのみ導入候補とする
Draft Workflow
name: Deploy MkDocs to GitHub Pages
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: github-pages
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Build MkDocs site
run: |
python -m mkdocs build
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: site
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
Activation Conditions
この draft は以下が確認できるまでは active にしません。
- GitHub Enterprise Cloud private Pages access が org 条件として満たされること
- Core approval が出ること
- repository settings 上で Pages source を
GitHub Actionsとして扱う方針が確定すること
Notes
requirements.txtを install source とするsite/は generated output であり commit しない- workflow 化するのは別 phase の作業とする