β¬ Bump actions/download-artifact from 5 to 6 #2
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: Documentation (Docusaurus) Build Check | |
| on: | |
| pull_request: | |
| paths: | |
| # Documentation CI workflow | |
| - ".github/workflows/docs-build-check.yaml" | |
| - ".github/workflows/documentation.yaml" | |
| # Documentation dependencies | |
| - "docs/package.json" | |
| - "docs/pnpm-lock.yaml" | |
| # Docusaurus configuration | |
| - "docs/docusaurus.config.ts" | |
| - "docs/tsconfig.json" | |
| # Documentation content | |
| - "docs/**/*.md" | |
| - "docs/**/*.mdx" | |
| - "docs/**/*.ts" | |
| - "docs/**/*.tsx" | |
| - "docs/**/*.js" | |
| - "docs/**/*.jsx" | |
| - "docs/**/*.css" | |
| - "docs/**/*.json" | |
| # Docusaurus versioning | |
| - "docs/*_versions.json" | |
| - "docs/*_versioned_docs/**" | |
| - "docs/*_versioned_sidebars/**" | |
| # Static assets | |
| - "docs/static/**" | |
| - "docs/src/**" | |
| permissions: | |
| contents: read | |
| # Allow cancelling in-progress runs for the same PR/branch | |
| concurrency: | |
| group: docs-build-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build_docs: | |
| name: Build Documentation | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 1 # Shallow clone for build check | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| run_install: false | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '22' | |
| cache: 'pnpm' | |
| cache-dependency-path: docs/pnpm-lock.yaml | |
| - name: Install dependencies | |
| working-directory: ./docs | |
| run: pnpm install --frozen-lockfile | |
| # - name: Type check | |
| # working-directory: ./docs | |
| # run: pnpm typecheck | |
| - name: Build documentation | |
| working-directory: ./docs | |
| run: pnpm build | |
| - name: Check build output | |
| run: | | |
| if [ ! -d "docs/build" ]; then | |
| echo "β Build directory not found!" | |
| exit 1 | |
| fi | |
| if [ ! -f "docs/build/index.html" ]; then | |
| echo "β Main index.html not generated!" | |
| exit 1 | |
| fi | |
| # Check for common build artifacts | |
| BUILD_SIZE=$(du -sh docs/build | cut -f1) | |
| echo "β Documentation built successfully!" | |
| echo "π Build size: $BUILD_SIZE" | |
| echo "π Files generated: $(find docs/build -type f | wc -l)" | |
| - name: Validate build quality | |
| run: | | |
| # Check for broken links in build output (basic validation) | |
| cd docs/build | |
| # Count HTML files | |
| HTML_COUNT=$(find . -name "*.html" | wc -l) | |
| echo "π HTML files generated: $HTML_COUNT" | |
| if [ "$HTML_COUNT" -lt 5 ]; then | |
| echo "β οΈ Warning: Very few HTML files generated ($HTML_COUNT)" | |
| echo "This might indicate a build issue" | |
| fi | |
| # Check for critical files | |
| CRITICAL_FILES=("index.html" "404.html") | |
| for file in "${CRITICAL_FILES[@]}"; do | |
| if [ -f "$file" ]; then | |
| echo "β Critical file found: $file" | |
| else | |
| echo "β οΈ Critical file missing: $file" | |
| fi | |
| done | |
| - name: Build summary | |
| if: always() | |
| run: | | |
| echo "## π Documentation Build Summary" >> $GITHUB_STEP_SUMMARY | |
| if [ -d "docs/build" ]; then | |
| BUILD_SIZE=$(du -sh docs/build | cut -f1) | |
| FILE_COUNT=$(find docs/build -type f | wc -l) | |
| HTML_COUNT=$(find docs/build -name "*.html" | wc -l) | |
| echo "β **Build Status**: Success" >> $GITHUB_STEP_SUMMARY | |
| echo "π **Build Size**: $BUILD_SIZE" >> $GITHUB_STEP_SUMMARY | |
| echo "π **Total Files**: $FILE_COUNT" >> $GITHUB_STEP_SUMMARY | |
| echo "π **HTML Pages**: $HTML_COUNT" >> $GITHUB_STEP_SUMMARY | |
| else | |
| echo "β **Build Status**: Failed" >> $GITHUB_STEP_SUMMARY | |
| echo "The documentation build did not complete successfully." >> $GITHUB_STEP_SUMMARY | |
| fi |