diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 9c082a4..15eea39 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -1,8 +1,10 @@ name: deploy docs on: push: - paths-ignore: - - "README.md" + paths: + - 'website/**' + - 'docs/**' + - 'CONTRIBUTING.md' branches: - main workflow_dispatch: diff --git a/.github/workflows/generate-cable-docs.yml b/.github/workflows/generate-cable-docs.yml index dc7211f..6be2eae 100644 --- a/.github/workflows/generate-cable-docs.yml +++ b/.github/workflows/generate-cable-docs.yml @@ -10,6 +10,9 @@ permissions: contents: write on: pull_request: + paths: + - 'cable/**' + - 'assets/channels/**' workflow_dispatch: jobs: generate-docs: diff --git a/.github/workflows/test-deploy-docs.yml b/.github/workflows/test-deploy-docs.yml index 662de19..4b5ff24 100644 --- a/.github/workflows/test-deploy-docs.yml +++ b/.github/workflows/test-deploy-docs.yml @@ -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 \ No newline at end of file + working-directory: website + diff --git a/assets/tv-aws-buckets.png b/assets/channels/aws-buckets.png similarity index 100% rename from assets/tv-aws-buckets.png rename to assets/channels/aws-buckets.png diff --git a/docs/01-Users/10-community-channels-unix.md b/docs/01-Users/10-community-channels-unix.md index ae94643..88706df 100644 --- a/docs/01-Users/10-community-channels-unix.md +++ b/docs/01-Users/10-community-channels-unix.md @@ -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] diff --git a/docs/01-Users/10-community-channels-windows.md b/docs/01-Users/10-community-channels-windows.md index 4fa8d32..d7799d7 100644 --- a/docs/01-Users/10-community-channels-windows.md +++ b/docs/01-Users/10-community-channels-windows.md @@ -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] diff --git a/justfile b/justfile index 8d92843..21361ec 100644 --- a/justfile +++ b/justfile @@ -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 diff --git a/scripts/generate_cable_docs.py b/scripts/generate_cable_docs.py index 99259c0..8a2e64a 100644 --- a/scripts/generate_cable_docs.py +++ b/scripts/generate_cable_docs.py @@ -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"