-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (33 loc) · 1009 Bytes
/
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
name: Deploy to GitHub pages
on:
push:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Generate static pydoc html
uses: actions/setup-python@v2
with:
python-version: '3.10'
- run: |
python -m pip install --upgrade pip
python -m pip install git+https://github.com/pdoc3/pdoc.git@f358893e4fcfd7f29857a7ff5491b606ff146d39
python -m pdoc --html bitspec.py
- name: Build docs and commit to fresh git repo
run: |
cd html
mv bitspec.html index.html
git init
git add -A
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git commit -m 'deploy'
- name: Force push to destination branch
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
force: true
directory: ./html