-
Notifications
You must be signed in to change notification settings - Fork 169
54 lines (47 loc) · 1.46 KB
/
pr_update-linting-and-api-references.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
50
51
52
53
54
name: Run linting, update API References and commit changes
on:
pull_request_target:
types:
- opened
- synchronize
- ready_for_review
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: write
jobs:
check-linting-and-docs-changes:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.head_ref }}
- uses: astral-sh/setup-uv@v4
with:
version: "latest"
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Set $PY environment variable
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
shell: bash
# should install with `-e`
run: |
set -ux
uv pip install --system -e .[dev]
- uses: pre-commit/[email protected]
continue-on-error: true
with:
extra_args: --hook-stage manual --all-files
- name: Run build docs
run: bash scripts/build-docs.sh
- name: Commit
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "docs: generate API References"