Skip to content

[jsweep] Clean add_reaction_and_edit_comment.cjs #3402

[jsweep] Clean add_reaction_and_edit_comment.cjs

[jsweep] Clean add_reaction_and_edit_comment.cjs #3402

Workflow file for this run

name: Doc Build - Deploy
on:
schedule:
# Daily rebuild so the Playground can pick up updated run snapshots.
# (GitHub uses UTC for cron schedules.)
- cron: '0 6 * * *'
workflow_dispatch:
release:
types: [created]
pull_request:
paths:
- 'docs/**'
push:
branches:
- main
paths:
- 'docs/**'
# Allow this job to clone the repo and create a page deployment
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages-${{ github.ref }}"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- name: Setup Node.js
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6
with:
node-version: '24'
cache: 'npm'
cache-dependency-path: 'docs/package-lock.json'
- name: Install dependencies
working-directory: ./docs
run: npm ci
- name: Fetch org-owned playground workflows
working-directory: ./docs
run: npm run fetch-playground-org-owned
- name: Validate Playground fetch configuration (optional)
working-directory: ./docs
env:
PLAYGROUND_SNAPSHOTS_REPO: ${{ secrets.PLAYGROUND_SNAPSHOTS_REPO }}
PLAYGROUND_SNAPSHOTS_REF: ${{ secrets.PLAYGROUND_SNAPSHOTS_REF }}
PLAYGROUND_SNAPSHOTS_PATH: ${{ secrets.PLAYGROUND_SNAPSHOTS_PATH }}
PLAYGROUND_SNAPSHOTS_TOKEN: ${{ secrets.PLAYGROUND_SNAPSHOTS_TOKEN }}
shell: bash
run: |
set -euo pipefail
if [[ -z "${PLAYGROUND_SNAPSHOTS_REPO:-}" ]]; then
echo "[playground] PLAYGROUND_SNAPSHOTS_REPO not set; skipping private-repo fetch."
exit 0
fi
if [[ -z "${PLAYGROUND_SNAPSHOTS_TOKEN:-}" ]]; then
echo "::error::[playground] PLAYGROUND_SNAPSHOTS_TOKEN is required to fetch from a private repo."
exit 1
fi
echo "[playground] Repo: ${PLAYGROUND_SNAPSHOTS_REPO}"
echo "[playground] Ref: ${PLAYGROUND_SNAPSHOTS_REF:-<default main>}"
echo "[playground] Snapshots path: ${PLAYGROUND_SNAPSHOTS_PATH:-<default docs/playground-snapshots>}"
- name: Fetch playground workflows (optional)
working-directory: ./docs
env:
PLAYGROUND_WORKFLOWS_REPO: ${{ secrets.PLAYGROUND_SNAPSHOTS_REPO }}
PLAYGROUND_WORKFLOWS_REF: ${{ secrets.PLAYGROUND_SNAPSHOTS_REF }}
PLAYGROUND_WORKFLOWS_TOKEN: ${{ secrets.PLAYGROUND_SNAPSHOTS_TOKEN }}
# Repo-relative file paths to fetch (comma-separated).
PLAYGROUND_WORKFLOWS_FILES: >-
.github/workflows/project-board-draft-updater.md,
.github/workflows/project-board-draft-updater.lock.yml,
.github/workflows/project-board-issue-updater.md,
.github/workflows/project-board-issue-updater.lock.yml
run: npm run fetch-playground-workflows
- name: Build documentation
working-directory: ./docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm run build
- name: Upload build artifacts
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3
with:
path: ./docs/dist
deploy:
# make this conditional on the branch being main
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4