Skip to content

Commit bb9da2e

Browse files
authored
Add interactive playground page for GitHub Actions workflow visualization (#7321)
1 parent 02dd2ec commit bb9da2e

34 files changed

Lines changed: 25831 additions & 9 deletions

.github/workflows/docs.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: Doc Build - Deploy
22

33
on:
4+
schedule:
5+
# Daily rebuild so the Playground can pick up updated run snapshots.
6+
# (GitHub uses UTC for cron schedules.)
7+
- cron: '0 6 * * *'
48
workflow_dispatch:
59
release:
610
types: [created]
@@ -43,6 +47,54 @@ jobs:
4347
working-directory: ./docs
4448
run: npm ci
4549

50+
- name: Fetch org-owned playground workflows
51+
working-directory: ./docs
52+
env:
53+
# Repo-relative file paths to copy into docs bundle (comma-separated).
54+
PLAYGROUND_ORG_WORKFLOWS_FILES: >-
55+
.github/workflows/playground-executor.md,
56+
.github/workflows/playground-executor.lock.yml
57+
run: npm run fetch-playground-org-owned
58+
59+
- name: Validate Playground fetch configuration (optional)
60+
working-directory: ./docs
61+
env:
62+
PLAYGROUND_SNAPSHOTS_REPO: ${{ secrets.PLAYGROUND_SNAPSHOTS_REPO }}
63+
PLAYGROUND_SNAPSHOTS_REF: ${{ secrets.PLAYGROUND_SNAPSHOTS_REF }}
64+
PLAYGROUND_SNAPSHOTS_PATH: ${{ secrets.PLAYGROUND_SNAPSHOTS_PATH }}
65+
PLAYGROUND_SNAPSHOTS_TOKEN: ${{ secrets.PLAYGROUND_SNAPSHOTS_TOKEN }}
66+
shell: bash
67+
run: |
68+
set -euo pipefail
69+
70+
if [[ -z "${PLAYGROUND_SNAPSHOTS_REPO:-}" ]]; then
71+
echo "[playground] PLAYGROUND_SNAPSHOTS_REPO not set; skipping private-repo fetch."
72+
exit 0
73+
fi
74+
75+
if [[ -z "${PLAYGROUND_SNAPSHOTS_TOKEN:-}" ]]; then
76+
echo "::error::[playground] PLAYGROUND_SNAPSHOTS_TOKEN is required to fetch from a private repo."
77+
exit 1
78+
fi
79+
80+
echo "[playground] Repo: ${PLAYGROUND_SNAPSHOTS_REPO}"
81+
echo "[playground] Ref: ${PLAYGROUND_SNAPSHOTS_REF:-<default main>}"
82+
echo "[playground] Snapshots path: ${PLAYGROUND_SNAPSHOTS_PATH:-<default docs/playground-snapshots>}"
83+
84+
- name: Fetch playground workflows (optional)
85+
working-directory: ./docs
86+
env:
87+
PLAYGROUND_WORKFLOWS_REPO: ${{ secrets.PLAYGROUND_SNAPSHOTS_REPO }}
88+
PLAYGROUND_WORKFLOWS_REF: ${{ secrets.PLAYGROUND_SNAPSHOTS_REF }}
89+
PLAYGROUND_WORKFLOWS_TOKEN: ${{ secrets.PLAYGROUND_SNAPSHOTS_TOKEN }}
90+
# Repo-relative file paths to fetch (comma-separated).
91+
PLAYGROUND_WORKFLOWS_FILES: >-
92+
.github/workflows/project-board-draft-updater.md,
93+
.github/workflows/project-board-draft-updater.lock.yml,
94+
.github/workflows/project-board-issue-updater.md,
95+
.github/workflows/project-board-issue-updater.lock.yml
96+
run: npm run fetch-playground-workflows
97+
4698
- name: Build documentation
4799
working-directory: ./docs
48100
env:

.github/workflows/issue-classifier.lock.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)