-
-
Notifications
You must be signed in to change notification settings - Fork 182
45 lines (45 loc) · 1.45 KB
/
Copy pathgenerate-cable-docs.yml
File metadata and controls
45 lines (45 loc) · 1.45 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
# This workflow generates documentation for tv channels automatically based
# on what's in the `cable` directory.
#
# See `./scripts/generate_cable_docs.py`
#
# The script will automatically pick up any corresponding demo image files
# in the `assets/channels` directory that match the channel names.
name: Generate Cable Docs
permissions:
contents: write
on:
push:
paths:
- 'cable/**'
- 'assets/channels/**'
workflow_dispatch:
jobs:
generate-docs:
name: Generate Cable Docs
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v7
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Set up Python
run: uv python install
- name: create venv
run: uv venv && source .venv/bin/activate
- name: Install dependencies
run: python -m pip install toml
- name: Generate documentation
run: python scripts/generate_cable_docs.py
- name: if docs changed, create a PR
uses: peter-evans/create-pull-request@v8
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: 'docs(cable): update channel documentation (auto)'
title: 'docs(cable): update channel documentation (auto)'
body: 'This PR was created by a GitHub Action to update the channel documentation.'
branch: bot/auto-cable-docs-update
base: main
add-paths: docs