0.29.0 #84
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: compare llms-full.txt | |
| permissions: | |
| contents: read | |
| on: | |
| pull_request: | |
| paths: | |
| - '.github/workflows/compare.yml' | |
| - 'site/**' | |
| workflow_dispatch: | |
| jobs: | |
| build-current: | |
| name: Build current branch | |
| runs-on: ubuntu-latest | |
| outputs: | |
| artifact-name: current-llms-full-txt | |
| steps: | |
| - name: Harden Runner | |
| uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1 | |
| with: | |
| egress-policy: audit | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 | |
| - name: Use Node.js | |
| uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 | |
| with: | |
| cache: 'pnpm' | |
| node-version: lts/* | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Build | |
| working-directory: site | |
| run: pnpm build | |
| - name: Upload current build artifact | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| with: | |
| name: current-llms-full-txt | |
| path: site/build/llms-full.txt | |
| build-target: | |
| name: Build target branch | |
| runs-on: ubuntu-latest | |
| outputs: | |
| artifact-name: target-llms-full-txt | |
| steps: | |
| - name: Harden Runner | |
| uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1 | |
| with: | |
| egress-policy: audit | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 | |
| - name: Use Node.js | |
| uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 | |
| with: | |
| cache: 'pnpm' | |
| node-version: lts/* | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Checkout target branch and build | |
| run: | | |
| TARGET_BRANCH=${{ github.event.pull_request.base.ref || 'master' }} | |
| git fetch origin $TARGET_BRANCH:$TARGET_BRANCH | |
| git checkout $TARGET_BRANCH | |
| pnpm install | |
| cd site && pnpm build | |
| - name: Upload target build artifact | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| with: | |
| name: target-llms-full-txt | |
| path: site/build/llms-full.txt | |
| diff: | |
| name: Diff current branch vs. target branch | |
| runs-on: ubuntu-latest | |
| needs: [build-current, build-target] | |
| steps: | |
| - name: Download current build | |
| uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0 | |
| with: | |
| name: current-llms-full-txt | |
| path: current/ | |
| - name: Download target build | |
| uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0 | |
| with: | |
| name: target-llms-full-txt | |
| path: target/ | |
| - name: Diff current vs. target | |
| uses: LouisBrunner/diff-action@9ea7b75986aa27143ad4928974c98a5a1bd92170 # v2.2.0 | |
| with: | |
| mode: addition | |
| new: current/llms-full.txt | |
| old: target/llms-full.txt | |
| output: diff-llms-full.txt | |
| tolerance: mixed |