Skip to content

Commit 8112328

Browse files
ki4070ma森敦史
and
森敦史
authored
ci: Add github actions to build doc (#4)
* Add github actions to build doc * Add trigger for PR * Add trigger for manual * update * check behavior * check behavior2 * check behavior: if * check behavior: env var * remove env var, add if state * fix: if state * add create PR * fix * fix * check * remove strategy * Use py3.7 * Install dependencies * Fix pipenv * Fix pipenv * Install python-client * Remove pipenv * Add creating PR * Cron: weekly * Add reviewers * tweak * review comments * fix * cron: weekly * Revert "cron: weekly" This reverts commit 4c3e7f7. * cron: weekly * Removed unnecessary doc * review comment * for check * revert: for check Co-authored-by: 森敦史 <[email protected]>
1 parent 1e159cc commit 8112328

File tree

2 files changed

+47
-15
lines changed

2 files changed

+47
-15
lines changed

.github/workflows/pythonpackage.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Python CI
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * SUN'
6+
7+
jobs:
8+
build:
9+
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
with:
15+
path: ./python-client-sphinx
16+
- uses: actions/checkout@v2
17+
with:
18+
repository: appium/python-client
19+
path: ./python-client
20+
- name: Set up Python
21+
uses: actions/setup-python@v2
22+
with:
23+
python-version: '3.x'
24+
- name: Setup python-client
25+
run: |
26+
python -m pip install --upgrade pip
27+
python setup.py install
28+
working-directory: python-client
29+
- name: Build doc
30+
shell: bash -xe {0}
31+
run: |
32+
python -m pip install -r requirements.txt
33+
bash generate.sh
34+
working-directory: python-client/docs
35+
- name: Check if PR needed
36+
shell: bash -xe {0}
37+
run: |
38+
rm -r docs
39+
cp -r ../python-client/docs/_build/html ./docs
40+
git --no-pager diff --stat
41+
if (git --no-pager diff --stat | grep -q "2 files changed, 2 insertions(+), 2 deletions(-)"); then exit 1; fi
42+
working-directory: python-client-sphinx
43+
- name: Create Pull Request
44+
uses: peter-evans/create-pull-request@v3
45+
with:
46+
path: ./python-client-sphinx

README.md

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,2 @@
11
# Documents
2-
https://appium.github.io/python-client-sphinx/
3-
4-
# How to update documents
5-
6-
```bash
7-
git clone [email protected]:appium/python-client.git
8-
git clone [email protected]:appium/python-client-sphinx.git
9-
10-
cd /path/to/python-client/docs
11-
bash generate.sh
12-
13-
cd /path/to/python-client-sphinx
14-
rm -r docs
15-
cp -r /path/to/python-client/docs/_build/html ./docs
16-
```
2+
https://appium.github.io/python-client-sphinx/

0 commit comments

Comments
 (0)