-
Notifications
You must be signed in to change notification settings - Fork 93
76 lines (67 loc) · 2.03 KB
/
generate_cli_doc.yml
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Update API docs
on:
pull_request:
paths:
- "src/_nebari/subcommands/**"
- "src/_nebari/cli.py"
push:
branches:
- main
paths:
- "src/_nebari/subcommands/**"
- "src/_nebari/cli.py"
workflow_dispatch:
jobs:
update_api:
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
working-directory: ./docs-sphinx
steps:
- name: Check out repository 🛎️
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install nebari and docs dependencies
run: |
python -m pip install --upgrade pip
pip install -e "../[docs]"
- name: Generate new API docs
run: |
make html
- name: Copy cli doc
run: |
cp _build/html/cli.html cli.html
- name: Look for changes to generated docs
uses: tj-actions/verify-changed-files@v12
id: verify-changed-files
with:
files: |
docs-sphinx/cli.html
- name: Create Pull Request in code repo
id: create_pull_request
uses: peter-evans/create-pull-request@v4
if: steps.verify-changed-files.outputs.files_changed == 'true' && github.event_name != 'pull_request'
with:
token: ${{ secrets.NEBARI_SENSEI_API_DOCS_PR_OPENER }}
commit-message: Update api docs
committer: GitHub <[email protected]>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
signoff: false
branch: auto_cli_doc_update
delete-branch: true
title: '[AUTO] Update CLI doc'
body: |
Update CLI doc
- Auto-generated by [create-pull-request][1]
[1]: https://github.com/peter-evans/create-pull-request
labels: |
"area: documentation 📖"
draft: false
base: ${{ github.head_ref }}