Validating sidebar links #6
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: Validate Sidebar Links | |
| run-name: Validating sidebar links | |
| on: | |
| pull_request: | |
| branches: | |
| - master | |
| paths: | |
| - 'sidebars.js' | |
| - 'sdk-sidebar.js' | |
| - 'docs/**/*.md' | |
| - 'docs/**/*.mdx' | |
| - 'scripts/check-sidebar-links.ts' | |
| - '.github/workflows/validate-sidebar-links.yml' | |
| push: | |
| branches: | |
| - master | |
| paths: | |
| - 'sidebars.js' | |
| - 'sdk-sidebar.js' | |
| jobs: | |
| validate-sidebar-links: | |
| name: 'Validate Sidebar Links' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout files | |
| uses: actions/checkout@v4 | |
| with: | |
| # Need submodules for SDK documentation generation | |
| submodules: recursive | |
| fetch-depth: 1 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22.x' | |
| - name: Install node_modules | |
| uses: OffchainLabs/actions/node-modules/install@main | |
| with: | |
| install-command: yarn install --frozen-lockfile | |
| - name: Install SDK dependencies | |
| run: yarn install-sdk-dependencies | |
| - name: Generate SDK docs | |
| run: yarn generate-sdk-docs | |
| - name: Validate sidebar links | |
| run: yarn tsx scripts/check-sidebar-links.ts |