name: Deploy development documentation on: push: branches: - dev paths-ignore: - '**.md' - '**.yml' workflow_dispatch: {} jobs: deploy-docs: name: Build and deploy documentation runs-on: ubuntu-24.04 steps: - name: Checkout uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v5 with: python-version: "3.10" - name: Install build tools and doc build tools run: | pip install --upgrade "pip<24.1" "setuptools>=65.0.2,<=73.0.1" pip install boto smart_open sphinx sphinx-rtd-theme # 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 dependencies # env: # SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL: True # run: | # if [ -f docker_requirements.txt ]; then pip install -r docker_requirements.txt; fi - name: Install PyThaiNLP run: pip install . - 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'