chore: some gh actions + justfile improvements

This commit is contained in:
alexandre pasmantier 2025-07-18 01:38:40 +02:00
parent 14b91f5e55
commit 4d42a731bf
8 changed files with 28 additions and 8 deletions

View File

@ -1,8 +1,10 @@
name: deploy docs
on:
push:
paths-ignore:
- "README.md"
paths:
- 'website/**'
- 'docs/**'
- 'CONTRIBUTING.md'
branches:
- main
workflow_dispatch:

View File

@ -10,6 +10,9 @@ permissions:
contents: write
on:
pull_request:
paths:
- 'cable/**'
- 'assets/channels/**'
workflow_dispatch:
jobs:
generate-docs:

View File

@ -3,8 +3,10 @@ on:
pull_request:
branches:
- main
# Review gh actions docs if you want to further define triggers, paths, etc
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
paths:
- 'website/**'
- 'docs/**'
- 'CONTRIBUTING.md'
jobs:
test-deploy:
name: Test deployment
@ -26,4 +28,5 @@ jobs:
working-directory: website
- name: Build website
run: pnpm run build
working-directory: website
working-directory: website

View File

Before

Width:  |  Height:  |  Size: 415 KiB

After

Width:  |  Height:  |  Size: 415 KiB

View File

@ -28,6 +28,7 @@ output = "{split:=:0}"
List and preview AWS S3 Buckets
![tv running the aws-buckets channel](assets/channels/aws-buckets.png)
**Requirements:** `aws`
**Code:** *aws-buckets.toml*
@ -439,7 +440,7 @@ requirements = [ "rg", "bat",]
[source]
command = "rg . --no-heading --line-number"
display = "[{split:\\::..2}]\t{split:\\::2}"
display = "[{split:\\::..2}]\t{split:\\::2..}"
output = "{split:\\::..2}"
[preview]

View File

@ -358,7 +358,7 @@ requirements = [ "rg", "bat",]
[source]
command = "rg . --no-heading --line-number"
display = "[{split:\\::..2}]\t{split:\\::2}"
display = "[{split:\\::..2}]\t{split:\\::2..}"
output = "{split:\\::..2}"
[preview]

View File

@ -154,3 +154,14 @@ bump-version kind='patch':
# Start a local development server for the project's website
@start-website:
cd website && pnpm install && pnpm start
# Generate cable channel docs
@generate-cable-docs:
echo "Generating cable channel docs..."
python -m venv .venv && \
source .venv/bin/activate && \
python -m ensurepip && \
python -m pip install toml && \
python scripts/generate_cable_docs.py
echo "Docs generated in docs/cable_channels.md"
rm -rf .venv

View File

@ -30,7 +30,7 @@ def generate_cable_docs(os_name: str) -> str:
{channel_desc}
"""
img_path = Path(f"./assets/channels/{os_name}/{channel_name}.png")
img_path = Path(f"./assets/channels/{channel_name}.png")
if img_path.exists():
docs += f"![tv running the {channel_name} channel]({img_path})\n"