Skip to content

document

document #69

Workflow file for this run

name: document
on:
workflow_dispatch:
push:
branches:
- main
- develop
paths:
- "docs/**"
pull_request:
branches:
- main
- develop
paths:
- "docs/**"
concurrency:
group: "pages"
cancel-in-progress: true
permissions:
contents: write
pull-requests: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Install dependencies
run: uv sync --dev
- name: Build documentation
run: |
cd docs
uv run python build.py
- name: Redirect to the en documentation
run: |
username=$(echo $GITHUB_REPOSITORY | cut -d '/' -f 1)
repository=$(echo $GITHUB_REPOSITORY | cut -d '/' -f 2)
echo '<meta http-equiv="refresh" content="0; url=https://'$username'.github.io/'$repository'/en" />' > ./docs/pages/index.html
- name: Deploy documentation
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/pages