Repository navigation
60 lines (56 loc) · 1.67 KB
/
Copy pathpythonpackage.yml
File metadata and controls
60 lines (56 loc) · 1.67 KB
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
50
51
52
53
54
55
56
57
58
59
60
name: Python CI
on:
schedule:
- cron: '0 0 * * SUN'
workflow_dispatch:
inputs:
ref:
description: 'appium/python-client git ref (branch or tag) to build docs from'
required: false
default: 'master'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
path: ./python-client-sphinx
- uses: actions/checkout@v4
with:
repository: appium/python-client
ref: ${{ inputs.ref || 'master' }}
path: ./python-client
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Setup python-client
run: |
export PATH="$HOME/.local/bin:$PATH"
make install-uv
make sync-dev
working-directory: python-client
- name: Select documentation version
working-directory: python-client-sphinx
env:
TARGET_REF: ${{ inputs.ref || 'master' }}
run: echo "APPIUM_DOCS_VERSION=$(python scripts/docs_version.py)" >> "$GITHUB_ENV"
- name: Build doc
shell: bash -xe {0}
run: |
export PATH="$HOME/.local/bin:$PATH"
python ../../python-client-sphinx/scripts/sync_conf_version.py
bash generate.sh
working-directory: python-client/docs
- name: Check if PR needed
shell: bash -xe {0}
env:
TARGET_REF: ${{ inputs.ref || 'master' }}
run: |
bash scripts/update_docs.sh
working-directory: python-client-sphinx
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
path: ./python-client-sphinx
branch: create-pull-request/docs-${{ inputs.ref || 'master' }}