|
1 | 1 | name: Doc Build - Deploy |
2 | 2 |
|
3 | 3 | 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 * * *' |
4 | 8 | workflow_dispatch: |
5 | 9 | release: |
6 | 10 | types: [created] |
|
43 | 47 | working-directory: ./docs |
44 | 48 | run: npm ci |
45 | 49 |
|
| 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 | + |
46 | 98 | - name: Build documentation |
47 | 99 | working-directory: ./docs |
48 | 100 | env: |
|
0 commit comments