Merge pull request #504 from m-yamanashi/add-v3-document #22
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Pages | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- 'devel-*' | |
paths: | |
- 'en/**' | |
- 'ja/**' | |
- 'portal/**' | |
- 'root/**' | |
- 'v3/**' | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
jobs: | |
# Build job | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
steps: | |
- name: Checkout | |
uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 | |
- name: Setup Pages | |
uses: actions/configure-pages@1f0c5cde4bc74cd7e1254d0cb4de8d49e9068c7d # v4.0.0 | |
- name: Setup Python | |
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 | |
with: | |
python-version: '3.11' | |
- name: Install Dependencies | |
run: | | |
python3 -m pip install -U pip setuptools | |
python3 -m pip install -r requirements.txt | |
- name: Build document | |
run: | | |
mkdocs build --config-file ./root/mkdocs.yml --site-dir "${GITHUB_WORKSPACE}/site" | |
mkdocs build --config-file ./ja/mkdocs.yml --site-dir "${GITHUB_WORKSPACE}/site/ja/" | |
mkdocs build --config-file ./en/mkdocs.yml --site-dir "${GITHUB_WORKSPACE}/site/en/" | |
mkdocs build --config-file ./portal/root/mkdocs.yml --site-dir "${GITHUB_WORKSPACE}/site/portal/" | |
mkdocs build --config-file ./portal/ja/mkdocs.yml --site-dir "${GITHUB_WORKSPACE}/site/portal/ja/" | |
mkdocs build --config-file ./portal/en/mkdocs.yml --site-dir "${GITHUB_WORKSPACE}/site/portal/en/" | |
mkdocs build --config-file ./v3/root/mkdocs.yml --site-dir "${GITHUB_WORKSPACE}/site/v3/" | |
mkdocs build --config-file ./v3/ja/mkdocs.yml --site-dir "${GITHUB_WORKSPACE}/site/v3/ja/" | |
mkdocs build --config-file ./v3/en/mkdocs.yml --site-dir "${GITHUB_WORKSPACE}/site/v3/en/" | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1 | |
with: | |
path: ./site | |
# Deployment job | |
deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: build | |
permissions: | |
pages: write | |
id-token: write | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5 | |