🔒(deps-dev): Bump @biomejs/biome from 2.2.2 to 2.2.3 #35
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: ⚡ Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: 📦 Install dependencies | |
| run: bun install | |
| - 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 validated!" | |
| - name: 🔍 Security audit | |
| run: | | |
| echo "🔍 Running security audit..." | |
| # Using npm audit as Bun doesn't have equivalent security audit yet | |
| npm audit --audit-level=moderate | |
| echo "✅ Security audit completed!" | |
| - name: 📦 Dependency validation | |
| run: | | |
| echo "📦 Validating dependencies..." | |
| # Using npm ls for compatibility - Bun manages the same package-lock.json | |
| npm ls --depth=0 | |
| echo "✅ Dependencies validated!" | |
| # 🏗️ Build Validation (Cloudflare handles actual deployment) | |
| build-validation: | |
| name: 🏗️ Build Validation | |
| runs-on: ubuntu-latest | |
| needs: test-and-validate | |
| timeout-minutes: 20 | |
| steps: | |
| - name: 📥 Checkout code | |
| uses: actions/checkout@v5.0.0 | |
| - name: ⚡ Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: 📦 Install dependencies | |
| run: bun install | |
| - name: 🏗️ Build Astro portfolio | |
| run: | | |
| echo "🏗️ Building Astro portfolio..." | |
| bun run build | |
| echo "✅ Build completed successfully!" | |
| echo "🌐 Deployment will be handled by Cloudflare Pages" | |
| - name: 📊 Verify build output & metrics | |
| run: | | |
| echo "📊 Build metrics:" | |
| echo "📁 Build output size:" | |
| du -sh dist/ | |
| echo "" | |
| echo "📄 Generated files breakdown:" | |
| HTML_COUNT=$(find dist/ -name "*.html" | wc -l) | |
| JS_COUNT=$(find dist/ -name "*.js" | wc -l) | |
| CSS_COUNT=$(find dist/ -name "*.css" | wc -l) | |
| echo "📄 HTML files: $HTML_COUNT" | |
| echo "📜 JS files: $JS_COUNT" | |
| echo "🎨 CSS files: $CSS_COUNT" | |
| echo "" | |
| echo "🎯 Portfolio validation:" | |
| if [ "$HTML_COUNT" -ge 5 ]; then | |
| echo "✅ HTML pages: $HTML_COUNT (target: 5+)" | |
| else | |
| echo "⚠️ HTML pages: $HTML_COUNT (expected: 5+)" | |
| fi | |
| echo "" | |
| echo "🌐 Ready for Cloudflare Pages deployment" | |
| echo " • Auto-deploy on main branch push" | |
| echo " • Preview deploys on PRs" | |
| - name: 🧪 Test site preview | |
| run: | | |
| echo "🧪 Testing site preview..." | |
| timeout 15s bun run preview > preview.log 2>&1 || true | |
| echo "✅ Preview test completed" | |
| # Check if preview started successfully | |
| if grep -q "Local:" preview.log; then | |
| echo "✅ Preview server started successfully" | |
| else | |
| echo "ℹ️ Preview test completed (timeout expected)" | |
| fi | |
| # 🤖 Auto-Fix Common Issues | |
| auto-fix-issues: | |
| name: 🤖 Auto-Fix & Dependencies | |
| runs-on: ubuntu-latest | |
| if: failure() && github.ref == 'refs/heads/main' | |
| needs: [test-and-validate, build-validation] | |
| timeout-minutes: 15 | |
| steps: | |
| - name: 📥 Checkout code | |
| uses: actions/checkout@v5.0.0 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| fetch-depth: 0 | |
| - name: ⚡ Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: 🔧 Auto-fix linting issues | |
| run: | | |
| echo "🔧 Attempting to auto-fix linting issues..." | |
| bun install | |
| bun run lint:fix || true | |
| bun run format || true | |
| # Check if files were modified | |
| if git diff --quiet; then | |
| echo "ℹ️ No auto-fixable issues found" | |
| else | |
| echo "🔧 Auto-fixed some issues, committing..." | |
| git config --local user.email "action@github.com" | |
| git config --local user.name "GitHub Action Auto-Fix" | |
| git add . | |
| git commit -m "🤖 Auto-fix: Biome formatting and linting" | |
| - Applied automatic linting fixes | |
| - Standardized code formatting | |
| - Triggered by failed CI pipeline | |
| - Cloudflare Pages will auto-deploy these fixes" | |
| git push | |
| fi | |
| - name: 🔄 Update dependencies (if needed) | |
| run: | | |
| echo "🔄 Checking for dependency updates..." | |
| # Check for security vulnerabilities - using npm audit as Bun doesn't have equivalent | |
| if npm audit --audit-level=moderate; then | |
| echo "✅ No critical security issues" | |
| else | |
| echo "🔧 Attempting to fix security issues..." | |
| # Using npm audit fix for security patches - Bun manages same package-lock.json | |
| npm audit fix --force || true | |
| if ! git diff --quiet package*.json; then | |
| echo "📦 Dependencies updated, committing..." | |
| git add package*.json | |
| git commit -m "🔒 Security: Auto-update vulnerable dependencies | |
| - Fixed security vulnerabilities via npm audit fix (Bun compatible) | |
| - Automated dependency security update | |
| - Cloudflare Pages will deploy these security fixes" | |
| git push | |
| fi | |
| fi | |
| # | |
| # steps: | |
| # - name: Download build artifacts | |
| # uses: actions/download-artifact@v4 | |
| # with: | |
| # name: dist | |
| # path: dist/ | |
| # | |
| # - name: Deploy to hosting | |
| # run: echo "Deploy step would go here" |