This repository was archived by the owner on Oct 25, 2025. It is now read-only.
π(deps): Bump @astrojs/preact from 4.1.0 to 4.1.1 #33
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: π CI/CD - Build & Validate (Cloudflare Pages Deploy) | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - '**.md' | |
| - '.editorconfig' | |
| - '.gitignore' | |
| - 'docs/**' | |
| pull_request: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - '**.md' | |
| - '.editorconfig' | |
| - '.gitignore' | |
| - 'docs/**' | |
| workflow_dispatch: | |
| permissions: | |
| contents: write # Permitir commits y push | |
| jobs: | |
| # π§ͺ Testing & Quality Assurance | |
| test-and-validate: | |
| name: π Quality Assurance | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - name: π₯ Checkout code | |
| uses: actions/checkout@v5.0.0 | |
| - name: βοΈ Set up Node.js 22.x | |
| uses: actions/setup-node@v4.4.0 | |
| with: | |
| node-version: 22.x | |
| - name: π Set up Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: π¦ Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: π TypeScript validation | |
| run: | | |
| echo "π Running TypeScript check..." | |
| bun run type-check | |
| echo "β TypeScript validation passed!" | |
| - name: π§Ή Biome code quality | |
| run: | | |
| echo "π§Ή Running Biome linting..." | |
| bun run lint | |
| echo "β Code quality check completed!" | |
| - name: π Biome formatting check | |
| run: | | |
| echo "π Checking code formatting..." | |
| bun run format:check | |
| echo "β Code formatting is consistent!" | |
| - name: ποΈ Build validation | |
| run: | | |
| echo "ποΈ Building project..." | |
| bun run build | |
| echo "β Build completed successfully!" | |
| - name: π Build metrics | |
| run: | | |
| echo "π Build Metrics:" | |
| echo "π Build output size:" | |
| du -sh dist/ | |
| echo "π Generated pages:" | |
| find dist -name "*.html" | wc -l | xargs echo "HTML files:" | |
| echo "π¨ CSS files:" | |
| find dist -name "*.css" | wc -l | xargs echo "CSS files:" | |
| echo "β‘ JS files:" | |
| find dist -name "*.js" | wc -l | xargs echo "JS files:" | |
| # π§ Auto-fix workflow (runs only on test failures) | |
| auto-fix: | |
| name: π€ Auto-fix Issues | |
| runs-on: ubuntu-latest | |
| needs: test-and-validate | |
| if: failure() && github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| timeout-minutes: 10 | |
| steps: | |
| - name: π₯ Checkout code | |
| uses: actions/checkout@v5.0.0 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| fetch-depth: 0 | |
| - name: βοΈ Set up Node.js 22.x | |
| uses: actions/setup-node@v4.4.0 | |
| with: | |
| node-version: 22.x | |
| - name: π Set up Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: π¦ Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: π§ Auto-fix Biome issues | |
| run: | | |
| echo "π§ Attempting to auto-fix Biome issues..." | |
| bun run lint:fix || true | |
| echo "β Biome auto-fix completed!" | |
| - name: π¨ Auto-format with Biome | |
| run: | | |
| echo "π¨ Auto-formatting code with Biome..." | |
| bun run format | |
| echo "β Biome formatting completed!" | |
| - name: π Check for changes | |
| id: verify-changed-files | |
| run: | | |
| if [ -n "$(git status --porcelain)" ]; then | |
| echo "changed=true" >> $GITHUB_OUTPUT | |
| echo "β Changes detected after auto-fix" | |
| else | |
| echo "changed=false" >> $GITHUB_OUTPUT | |
| echo "βΉοΈ No changes after auto-fix" | |
| fi | |
| - name: π Commit and push auto-fixes | |
| if: steps.verify-changed-files.outputs.changed == 'true' | |
| run: | | |
| git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git config --local user.name "github-actions[bot]" | |
| git add . | |
| git commit -m "π€ Auto-fix: Biome linting and formatting | |
| - π§Ή Applied Biome auto-fixes | |
| - π Applied Biome formatting | |
| - π Automated by GitHub Actions | |
| [skip ci]" | |
| git push | |
| - name: β Re-run validation after auto-fix | |
| if: steps.verify-changed-files.outputs.changed == 'true' | |
| run: | | |
| echo "π Re-running validation after auto-fix..." | |
| bun run validate | |
| echo "β Validation passed after auto-fix!" | |
| # π Build Verification (only after successful tests) | |
| build-verification: | |
| name: ποΈ Build Verification | |
| runs-on: ubuntu-latest | |
| needs: test-and-validate | |
| if: success() | |
| timeout-minutes: 15 | |
| steps: | |
| - name: π₯ Checkout code | |
| uses: actions/checkout@v5.0.0 | |
| - name: βοΈ Set up Node.js 22.x | |
| uses: actions/setup-node@v4.4.0 | |
| with: | |
| node-version: 22.x | |
| - name: π Set up Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: π¦ Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: ποΈ Production build | |
| run: | | |
| echo "ποΈ Creating production build..." | |
| npm run build:prod | |
| echo "β Production build completed!" | |
| - name: π Performance analysis | |
| run: | | |
| echo "π Analyzing build performance..." | |
| echo "π Total build size:" | |
| du -sh dist/ | |
| echo "ποΈ File breakdown:" | |
| find dist -type f -exec ls -lh {} \; | awk '{print $5 " " $9}' | sort -hr | head -20 | |
| echo "β‘ Bundle analysis complete!" | |
| - name: π― Build artifacts summary | |
| run: | | |
| echo "π― Build Summary:" | |
| echo "π HTML pages: $(find dist -name '*.html' | wc -l)" | |
| echo "π¨ CSS files: $(find dist -name '*.css' | wc -l)" | |
| echo "β‘ JS files: $(find dist -name '*.js' | wc -l)" | |
| echo "πΌοΈ Images: $(find dist -name '*.png' -o -name '*.jpg' -o -name '*.jpeg' -o -name '*.svg' -o -name '*.webp' | wc -l)" | |
| echo "π¦ Other assets: $(find dist -type f ! -name '*.html' ! -name '*.css' ! -name '*.js' ! -name '*.png' ! -name '*.jpg' ! -name '*.jpeg' ! -name '*.svg' ! -name '*.webp' | wc -l)" |