Merge pull request #1279 from bact/add-type-marker #262
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
| # SPDX-FileCopyrightText: 2026 PyThaiNLP Project | |
| # SPDX-License-Identifier: Apache-2.0 | |
| # SPDX-FileType: SOURCE | |
| # Deploy documentation to https://pythainlp.org/docs/ | |
| name: Deploy dev docs | |
| on: | |
| push: | |
| branches: | |
| - dev | |
| paths: | |
| - ".github/workflows/deploy-docs.yml" | |
| - "build_tools/**" | |
| - "docs/**" | |
| - "pythainlp/**" | |
| - "Makefile" | |
| - "pyproject.toml" | |
| workflow_dispatch: {} | |
| jobs: | |
| deploy-docs: | |
| name: Build and deploy documentation | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| - name: Install build tools and doc build tools | |
| run: | | |
| pip install --upgrade "pip<24.1" "setuptools>=69.0.0,<=73.0.1" | |
| # pip<24.1 because https://github.com/omry/omegaconf/pull/1195 | |
| # setuptools>=65.0.2 because https://github.com/pypa/setuptools/commit/d03da04e024ad4289342077eef6de40013630a44#diff-9ea6e1e3dde6d4a7e08c7c88eceed69ca745d0d2c779f8f85219b22266efff7fR1 | |
| # setuptools<=73.0.1 because https://github.com/pypa/setuptools/issues/4620 | |
| - name: Install PyThaiNLP | |
| run: pip install ".[docs]" | |
| - name: Build sphinx documentation | |
| run: | | |
| cd docs && make html | |
| cd .. | |
| - name: Deploy documentation | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| personal_token: ${{ secrets.PERSONAL_TOKEN }} | |
| publish_dir: ./docs/_build/html | |
| external_repository: PyThaiNLP/dev-docs | |
| user_name: 'github-actions[bot]' | |
| user_email: 'github-actions[bot]@users.noreply.github.com' |