-
Notifications
You must be signed in to change notification settings - Fork 17
49 lines (42 loc) · 1.39 KB
/
pdoc_build.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
41
42
43
44
45
46
47
48
49
name: Generate Documents with pdoc
on:
push:
branches:
- main
- hackathon
jobs:
setup-python:
name: Generate Documentations
runs-on: ubuntu-22.04
permissions: # Job-level permissions configuration starts here
contents: write # 'write' access to repository contents
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0 # Ensures history is available for pushing changes
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10' # Set this to your Python version
- name: install-rcareworld
run: |
cd ./pyrcareworld
pip install -r requirements.txt
pip install -e .
cd ../
- name: Install pdoc
run: |
pip install pdoc3
pdoc --skip-errors --html pyrcareworld -o docs
- name: Commit Documentation
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
git add docs/*
git commit -m "Update documentation" || echo "No changes to commit"
- name: Push Changes
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}