Merge pull request #20 from sortA0329/developing #5
This file contains hidden or 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: Docs | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "docs/**" | |
| - "README.md" | |
| - "mkdocs.yml" | |
| - ".github/workflows/docs.yml" | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: docs-pages | |
| cancel-in-progress: true | |
| jobs: | |
| build-and-deploy: | |
| name: Build and deploy MkDocs | |
| runs-on: ubuntu-latest | |
| concurrency: | |
| group: gh-pages-deploy | |
| cancel-in-progress: false | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update -y | |
| sudo apt-get install -y pngquant | |
| - name: Install Task | |
| uses: go-task/setup-task@v2 | |
| with: | |
| version: 3.x | |
| - name: Setup Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.14" | |
| - name: Setup uv | |
| uses: astral-sh/setup-uv@v8.2.0 | |
| with: | |
| enable-cache: true | |
| cache-dependency-glob: | | |
| pyproject.toml | |
| uv.lock | |
| - name: Install Python dependencies | |
| run: uv sync --frozen | |
| - name: Build site | |
| run: task docs | |
| - name: Deploy to gh-pages | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_branch: gh-pages | |
| publish_dir: site | |
| keep_files: true | |
| commit_message: "chore(docs): publish run ${{ github.run_id }}" |