Skip to content

Commit 601af9e

Browse files
Create docs.yml
Signed-off-by: Ruslan Senatorov <55090151+ruslansenatorov@users.noreply.github.com>
1 parent 52eac36 commit 601af9e

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

.github/workflows/docs.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Build and Deploy Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- main # название ветки
7+
8+
jobs:
9+
build-and-deploy:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
with:
14+
fetch-depth: 0 # необходимо для получения всей истории репозитория
15+
16+
- name: Set up Python
17+
uses: actions/setup-python@v2
18+
with:
19+
python-version: '3.x' # версия питона
20+
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install sphinx sphinx-rtd-theme # зависимости
25+
26+
- name: Build Documentation
27+
run: |
28+
cd docs # переход в каталог с документацией
29+
make html # генерация документации
30+
31+
- name: Deploy Documentation to GitHub Pages
32+
uses: peaceiris/actions-gh-pages@v3
33+
with:
34+
github_token: ${{ secrets.GITHUB_TOKEN }}
35+
publish_dir: ./docs/_build/html # путь к сгенерированной документации

0 commit comments

Comments
 (0)