Python CI #59
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Python CI | |
on: | |
schedule: | |
- cron: '0 0 * * SUN' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
path: ./python-client-sphinx | |
- uses: actions/checkout@v2 | |
with: | |
repository: appium/python-client | |
path: ./python-client | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Setup python-client | |
run: | | |
python -m pip install --upgrade pip | |
python setup.py install | |
working-directory: python-client | |
- name: Build doc | |
shell: bash -xe {0} | |
run: | | |
python -m pip install -r requirements.txt | |
bash generate.sh | |
working-directory: python-client/docs | |
- name: Check if PR needed | |
shell: bash -xe {0} | |
run: | | |
rm -r docs | |
cp -r ../python-client/docs/_build/html ./docs | |
git --no-pager diff --stat | |
if (git --no-pager diff --stat | grep -q "docs/_sources/index.rst.txt | 2 +-"); then exit 1; fi | |
working-directory: python-client-sphinx | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v3 | |
with: | |
path: ./python-client-sphinx |