Threads 20: Add the thread playground model #1111
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Docs | |
| on: | |
| pull_request: | |
| concurrency: | |
| group: docs-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| docs: | |
| name: Docs | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - name: Check affected | |
| id: affected | |
| shell: bash | |
| env: | |
| TURBO_SCM_BASE: ${{ github.event.pull_request.base.sha }} | |
| TURBO_SCM_HEAD: ${{ github.event.pull_request.head.sha }} | |
| run: | | |
| set -euo pipefail | |
| TURBO_VERSION="$(node -p "require('./package.json').devDependencies.turbo")" | |
| if npx -y "turbo@${TURBO_VERSION}" query affected --tasks docs:links --packages @chatjs/docs --exit-code >/tmp/docs-query.json 2>/tmp/docs-query.log; then | |
| echo "run=false" >>"$GITHUB_OUTPUT" | |
| else | |
| status=$? | |
| if [ "$status" -eq 1 ]; then | |
| echo "run=true" >>"$GITHUB_OUTPUT" | |
| else | |
| cat /tmp/docs-query.log | |
| cat /tmp/docs-query.json | |
| exit "$status" | |
| fi | |
| fi | |
| - uses: oven-sh/setup-bun@v2 | |
| if: steps.affected.outputs.run == 'true' | |
| with: | |
| bun-version: 1.3.1 | |
| - uses: actions/cache@v4 | |
| if: steps.affected.outputs.run == 'true' | |
| with: | |
| path: ~/.bun/install/cache | |
| key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }} | |
| restore-keys: ${{ runner.os }}-bun- | |
| - if: steps.affected.outputs.run == 'true' | |
| run: bun install --frozen-lockfile | |
| - name: Validate and build docs | |
| if: steps.affected.outputs.run == 'true' | |
| env: | |
| TURBO_SCM_BASE: ${{ github.event.pull_request.base.sha }} | |
| TURBO_SCM_HEAD: ${{ github.event.pull_request.head.sha }} | |
| run: bunx turbo run docs:links build --affected --filter=@chatjs/docs |