Improve tree-agent TS rendering #9005
Workflow file for this run
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: Website validation | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| paths: | |
| - "docs/**" | |
| - "*.md" | |
| - "**/*.md" | |
| - "!.changeset/**" | |
| - "!build-tools/**" | |
| - "!RELEASE_NOTES/**" | |
| - "!server/**" | |
| defaults: | |
| run: | |
| working-directory: ./docs | |
| permissions: | |
| contents: read | |
| jobs: | |
| # Build the website (including API documentation). | |
| # Publish the build artifact for subsequent jobs to leverage. | |
| build_site: | |
| runs-on: ubuntu-latest | |
| name: Build site | |
| steps: | |
| # release notes: https://github.com/actions/checkout/releases/tag/v5.0.0 | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # ratchet:actions/checkout@v5 | |
| with: | |
| submodules: false | |
| # release notes: https://github.com/pnpm/action-setup/releases/tag/v4.2.0 | |
| - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # ratchet:pnpm/action-setup@v4 | |
| # release notes: https://github.com/actions/setup-node/releases/tag/v6.0.0 | |
| - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # ratchet:actions/setup-node@v6 | |
| with: | |
| node-version: "20" | |
| cache: "pnpm" | |
| cache-dependency-path: docs/pnpm-lock.yaml | |
| - name: Build site artifact | |
| run: | | |
| pnpm i --frozen-lockfile | |
| npm run build | |
| - name: Validate CSP hashes | |
| run: | | |
| ./validateHashes.sh | |
| - name: Upload site artifact | |
| # release notes: https://github.com/actions/upload-artifact/releases/tag/v4.4.3 | |
| uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # ratchet:actions/upload-artifact@v4 | |
| with: | |
| name: fluidframework-site | |
| path: docs/build | |
| retention-days: 3 | |
| # Run linter checks against the website content and infrastructure. | |
| lint: | |
| runs-on: ubuntu-latest | |
| name: pnpm lint | |
| steps: | |
| # release notes: https://github.com/actions/checkout/releases/tag/v5.0.0 | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # ratchet:actions/checkout@v5 | |
| with: | |
| submodules: false | |
| # release notes: https://github.com/pnpm/action-setup/releases/tag/v4.2.0 | |
| - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # ratchet:pnpm/action-setup@v4 | |
| # release notes: https://github.com/actions/setup-node/releases/tag/v6.0.0 | |
| - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # ratchet:actions/setup-node@v6 | |
| with: | |
| node-version: "20" | |
| cache: "pnpm" | |
| cache-dependency-path: docs/pnpm-lock.yaml | |
| - name: pnpm lint | |
| run: | | |
| pnpm i --frozen-lockfile | |
| pnpm lint | |
| # Run the website's tests. | |
| test: | |
| runs-on: ubuntu-latest | |
| name: 🧪 Website Tests | |
| needs: build_site | |
| steps: | |
| # release notes: https://github.com/actions/checkout/releases/tag/v5.0.0 | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # ratchet:actions/checkout@v5 | |
| with: | |
| submodules: false | |
| # release notes: https://github.com/pnpm/action-setup/releases/tag/v4.2.0 | |
| - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # ratchet:pnpm/action-setup@v4 | |
| # release notes: https://github.com/actions/setup-node/releases/tag/v6.0.0 | |
| - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # ratchet:actions/setup-node@v6 | |
| with: | |
| node-version: "20" | |
| cache: "pnpm" | |
| cache-dependency-path: docs/pnpm-lock.yaml | |
| - name: Download site artifact | |
| # release notes: https://github.com/actions/download-artifact/releases/tag/v4.1.8 | |
| uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # ratchet:actions/download-artifact@v4 | |
| with: | |
| name: fluidframework-site | |
| path: docs/build | |
| - name: Install dependencies | |
| run: "pnpm i --frozen-lockfile" | |
| - name: Run tests | |
| run: "npm run test" | |
| # Run the link checker against the website. | |
| # Publish the results to the PR as a comment. | |
| broken_link_check: | |
| runs-on: ubuntu-latest | |
| name: 🔗 Broken Link Check | |
| needs: build_site | |
| steps: | |
| # release notes: https://github.com/actions/checkout/releases/tag/v5.0.0 | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # ratchet:actions/checkout@v5 | |
| with: | |
| submodules: false | |
| # release notes: https://github.com/pnpm/action-setup/releases/tag/v4.2.0 | |
| - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # ratchet:pnpm/action-setup@v4 | |
| # release notes: https://github.com/actions/setup-node/releases/tag/v6.0.0 | |
| - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # ratchet:actions/setup-node@v6 | |
| with: | |
| node-version: "20" | |
| cache: "pnpm" | |
| cache-dependency-path: docs/pnpm-lock.yaml | |
| - name: Create results folder | |
| run: mkdir -p ./results | |
| - name: Download site artifact | |
| # release notes: https://github.com/actions/download-artifact/releases/tag/v4.1.8 | |
| uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # ratchet:actions/download-artifact@v4 | |
| with: | |
| name: fluidframework-site | |
| path: docs/build | |
| - name: Install dependencies | |
| run: "pnpm i --frozen-lockfile" | |
| - name: Check for broken links | |
| id: linkcheck | |
| continue-on-error: true | |
| run: | | |
| set -o pipefail | |
| pnpm run ci:check-links | tee ./results/linkcheck-output.txt | |
| - name: Save PR number | |
| run: echo ${{ github.event.number }} > ./results/pr | |
| - name: Save linkcheck report | |
| run: | | |
| cat "$GITHUB_WORKSPACE/.github/workflows/data/linkcheck-${{ steps.linkcheck.outcome }}.md" | tee ./results/linkcheck | |
| echo -e "\n#### linkcheck output\n\n\`\`\`" | tee -a ./results/linkcheck | |
| cat ./results/linkcheck-output.txt | tee -a ./results/linkcheck | |
| echo -e "\n\`\`\`" | tee -a ./results/linkcheck | |
| - name: Upload results artifact | |
| # release notes: https://github.com/actions/upload-artifact/releases/tag/v4.4.3 | |
| uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # ratchet:actions/upload-artifact@v4 | |
| with: | |
| name: website-validation-results | |
| path: ./docs/results | |
| retention-days: 3 |