File tree 1 file changed +17
-11
lines changed
1 file changed +17
-11
lines changed Original file line number Diff line number Diff line change 1
- name : Generate Documentation
1
+ name : CI
2
2
3
3
on :
4
4
push :
5
5
branches :
6
6
- main
7
7
8
8
jobs :
9
- generate-docs :
9
+ build :
10
10
runs-on : ubuntu-latest
11
11
12
12
steps :
13
13
- name : Checkout repository
14
14
uses : actions/checkout@v2
15
15
16
+ - name : Set up Git user
17
+ run : |
18
+ git config --global user.name 'github-actions'
19
+ git config --global user.email '[email protected] '
20
+
16
21
- name : Set up Python
17
22
uses : actions/setup-python@v2
18
23
with :
19
- python-version : " 3.x"
24
+ python-version : 3.x
20
25
21
26
- name : Install dependencies
22
27
run : |
23
28
python -m pip install --upgrade pip
24
29
pip install -r scripts/requirements.txt
25
30
26
- - name : Run generate_docs.py
31
+ - name : Generate documentation
32
+ run : python scripts/generate_docs.py
27
33
env :
28
34
OPENAI_API_KEY : ${{ secrets.OPENAI_API_KEY }}
29
- run : |
30
- python scripts/generate_docs.py
31
35
32
- - name : Commit changes
36
+ - name : Commit and push changes
33
37
run : |
34
- git config --global user.name 'github-actions'
35
- git config --global user.email '[email protected] '
36
38
git add .
37
- git commit -m 'Update documentation with code samples and descriptions'
38
- git push origin main
39
+ if git diff-index --quiet HEAD; then
40
+ echo "No changes to commit"
41
+ else
42
+ git commit -m "Update documentation with code samples and descriptions"
43
+ git push origin main
44
+ fi
You can’t perform that action at this time.
0 commit comments