-
Notifications
You must be signed in to change notification settings - Fork 274
47 lines (46 loc) · 1.61 KB
/
deploy-docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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'