-
Notifications
You must be signed in to change notification settings - Fork 2
61 lines (54 loc) · 1.65 KB
/
docs.yml
File metadata and controls
61 lines (54 loc) · 1.65 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Build new docs
on:
workflow_dispatch:
inputs:
doc_system:
description: Either pdoc, or mkdocs
default: pdoc
required: true
project_name:
description: if your package is called ahd, this would be ahd
default: package_name
required: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools wheel
python -m pip install .
python -m pip install --upgrade pdoc3
python -m pip install --upgrade mkdocs
# if doc_type is mkdocs
- name: Deploy docs
uses: mhausenblas/mkdocs-deploy-gh-pages@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: ${{ github.event.inputs.doc_system == 'mkdocs' }}
# if doc_type is pdoc
- name: Remove source files
run: rm -rf *
if: ${{ github.event.inputs.doc_system == 'pdoc'}}
- name: build html files
run: |
python -m pdoc ${{ github.event.inputs.package_name }} --html --force
mv "html/ezspreadsheet.html" "html/index.html"
cd html
ls
mv ${{ github.event.inputs.package_name }}/* .
ls
cd ..
ls
if: ${{ github.event.inputs.doc_system == 'pdoc' }}
- name: Deploy Docs
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./html
if: ${{ github.event.inputs.doc_system == 'pdoc' }}