40 lines (35 loc) · 1.06 KB
/
deploy-docs.yaml
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
name: GitHub Pages
on:
push:
branches:
- main
jobs:
deploy-docs:
runs-on: ubuntu-20.04
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.10"
# install poetry
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 - --version 1.2.0
- name: Add path for Poetry
run: echo "$HOME/.poetry/bin" >> $GITHUB_PATH
# install dependencies
- name: Install Dependencies
run: poetry install --no-interaction
# pdocでドキュメントを生成
- name: Pdoc
run: |
export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python
poetry run pdoc --html --output-dir docs --force openpack_torch
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs