[img] serve homepage offline #301
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: 🌐 public_html CI | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| checks: write | |
| issues: write | |
| on: | |
| pull_request: | |
| types: [opened, reopened, synchronize] | |
| paths: | |
| - "public_html/**" | |
| - ".github/workflows/public-html-ci.yml" | |
| - ".github/actions/setup-node-pnpm/**" | |
| concurrency: | |
| group: public-html-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| lint: | |
| name: "🔍 Lint (advisory)" | |
| runs-on: ubuntu-latest | |
| continue-on-error: true | |
| defaults: | |
| run: | |
| working-directory: public_html | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - name: Setup Node.js with pnpm | |
| uses: ./.github/actions/setup-node-pnpm | |
| with: | |
| working-directory: public_html | |
| - name: Check for Prettier configuration | |
| id: prettier-check | |
| run: | | |
| if [ -f ".prettierrc" ] || [ -f ".prettierrc.json" ] || [ -f ".prettierrc.js" ] || grep -q "prettier" package.json; then | |
| echo "has_prettier=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "has_prettier=false" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Run Prettier check | |
| if: steps.prettier-check.outputs.has_prettier == 'true' | |
| run: pnpm exec prettier --check . | |
| build: | |
| name: "🔨 Build" | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: public_html | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - name: Setup Node.js with pnpm | |
| uses: ./.github/actions/setup-node-pnpm | |
| with: | |
| working-directory: public_html | |
| - name: Build documentation site | |
| run: pnpm run build | |
| - name: Verify build output | |
| run: | | |
| if [ ! -d "_site" ]; then | |
| echo "Error: _site directory not found after build" | |
| exit 1 | |
| fi | |
| echo "✓ Build successful" | |
| echo "Build output size: $(du -sh _site | cut -f1)" | |
| echo "Files generated: $(find _site -type f | wc -l)" | |
| - name: Build summary | |
| run: | | |
| echo "## 🔨 Build Summary" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "- Output directory: \`_site/\`" >> $GITHUB_STEP_SUMMARY | |
| echo "- Total size: $(du -sh _site | cut -f1)" >> $GITHUB_STEP_SUMMARY | |
| echo "- Files generated: $(find _site -type f | wc -l)" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "### File Types" >> $GITHUB_STEP_SUMMARY | |
| echo "\`\`\`" >> $GITHUB_STEP_SUMMARY | |
| find _site -type f | sed 's/.*\.//' | sort | uniq -c | sort -rn | head -10 >> $GITHUB_STEP_SUMMARY | |
| echo "\`\`\`" >> $GITHUB_STEP_SUMMARY |