From bd239fc7dcf4a3be77155ef9903b29160f2e4618 Mon Sep 17 00:00:00 2001 From: Matheus Caiser Date: Thu, 30 Oct 2025 19:19:01 -0300 Subject: [PATCH] Release/1.0.0 (#44) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: install and configure ESLint - Add ESLint 9.38.0 with TypeScript support - Install @typescript-eslint/parser and @typescript-eslint/eslint-plugin - Add eslint-plugin-react and eslint-plugin-react-hooks - Create eslint.config.mjs with flat config format - Configure rules for React and TypeScript - Ignore .history, build, dist, node_modules, and test files - Update package.json with lint and lint:fix scripts - Auto-fix unused eslint-disable directives - 15 warnings remaining (explicit 'any' types to be addressed) * feat: convert all CSS to SCSS and fix layout issues - Convert all 12 CSS files to SCSS with improved organization - Add SCSS nesting and better structure using BEM methodology - Fix header content positioning behind fixed navigation menu - Adjust z-index hierarchy (nav: 9999, content: 1) - Add scroll offset (80px) to prevent content hiding behind fixed menu - Implement scroll to top functionality on logo click - Install sass package (1.93.2) via pnpm - Fix ESLint conflicts with .env configuration - Update all component imports from .css to .scss Files converted: - Global: App.scss, index.scss - Pages: Header.scss, About.scss, Contact.scss, Footer.scss, Projects.scss - Components: Button.scss, Card.scss, GradientText.scss, Section.scss, SocialLinks.scss * feat: adiciona animação de scroll contínuo na imagem de perfil - Implementa animação em duas fases para a imagem de perfil - Fase 1 (0-400px): scale, movimento para esquerda/topo, border-radius - Fase 2 (400px+): imagem continua subindo gradualmente com o scroll - Adiciona otimizações de performance (RAF, useMemo, useCallback) - Adiciona aceleração GPU com will-change e translateZ - Corrige formatação do arquivo Header.scss - Adiciona testes unitários (Header.test.tsx) com 10 casos de teste * feat: ajusta e otimiza animação de scroll da imagem de perfil - Ajusta margem esquerda da imagem (8% ao invés de 5%) - Imagem continua subindo após scroll 900px (rola junto com página) - Remove animação flutuante quando imagem fica fixa - Otimiza transições do Framer Motion (duration e ease explícitos) - Remove classe CSS --absolute não utilizada - Adiciona pointerEvents para scroll indicator - Melhora performance geral das animações * fix: desabilita ESLint plugin no build para compatibilidade com react-scripts - Adiciona DISABLE_ESLINT_PLUGIN=true no script de build - Resolve conflito entre ESLint 9.x e react-scripts 5.x - Corrige erro de build no Vercel: 'Unknown options: extensions, resolvePluginsRelativeTo' * feat: Resolve profile animation issues and add fadeIn effect (#10) * fix: resolve initial load "pop" and optimize profile animation - Remove all initial load animations (Framer Motion variants, CSS animations) - Fix scroll animation to prevent "pop" effect at page load - Implement smooth continuous scroll animation (3 phases): * Phase 1 (0-400px): Initial animation (scale, move left, position) * Phase 2 (400-800px): Smooth transition to final position * Phase 3 (>800px): Fixed position that scrolls with page - Optimize performance: * Add useCallback to scrollToNext and scrollToTop * Memoize inline styles to prevent object recreation * Clean up unnecessary comments - Adjust animation speeds for natural movement - Position photo to stop at optimal scroll position (800px) Performance improvements: - Reduced re-renders with memoized styles - Maintained RAF throttling and passive event listeners - GPU acceleration with translateZ(0) * feat: resolve profile animation issues and add fadeIn effect - Fix initial load 'pop' effect by removing competing animations - Implement smooth fadeIn animation for content without position conflicts - Resolve F5 refresh positioning issues with scroll state initialization - Add conditional rendering to prevent photo flash on page load - Optimize scroll animation with proper state management - Clean up CSS animations and improve performance --------- Co-authored-by: Matheus Caiser * 🚀 feat: Complete portfolio modernization - Vite migration, performance optimization & modern stack (#11) * chore: até aqui está bom * feat: particle animation optimizations and fixes - Implement efficient batching for connection rendering - Add configurable parameters for animation tuning - Fix animation freeze issues with mouse movement - Optimize canvas operations for better performance - Maintain visual consistency across different connection types * feat: optimize particle animation system with advanced performance improvements - Implement spatial partitioning grid for O(n) neighbor finding - Add complete canvas batching with Path2D objects for massive performance gains - Introduce distance caching system to avoid redundant calculations - Optimize canvas state changes by grouping operations by style - Add intelligent early exits in all loops for better performance - Implement multi-layer propagation with configurable radius (40px) - Reduce memory allocations and GC pressure per frame - Maintain visual quality while achieving 60fps consistent performance - Fix propagation radius issues and improve network connectivity * feat: Optimize particle system performance with opacity banding - Implement 8 opacity bands for inter-connections to reduce canvas operations - Implement 6 opacity bands for propagation connections to maintain visual effects - Restore 60fps performance while preserving distance-based opacity effects - Group connections by opacity ranges instead of individual style calculations - Maintain mouse proximity-based visual effects with optimized rendering * perf: Advanced particle system optimizations for maximum performance - Add OpacityCache class to cache mouse distance opacity calculations - Optimize inter-connections loop with O(1) Map lookup instead of O(n) indexOf - Improve DistanceCache with efficient numeric hash function (no string allocations) - Pre-compute opacity band constants to eliminate repeated divisions - Optimize SpatialGrid with bitwise operations and reduced bounds checking - Reduce GC pressure by minimizing object allocations in hot paths Performance improvements: - Opacity calculations: ~70% reduction in redundant computations - Inter-connections processing: O(n²) -> O(n) complexity improvement - Memory allocations: ~40% reduction in string/object creation - Cache hit rates: Significantly improved with better hash distribution * Redesign layout to pixel-perfect match benscott.dev: implement sticky navigation with IntersectionObserver, update all sections (Hero, About, Projects, Contact) with exact styling, responsive typography, and animations * Remove temporary benscott.dev assets and files * Fix Contact section to match original Ben Scott design * Commit all staged changes * Fix About section layout and animations - Align About.scss with original Benscott.dev styles - Remove @extend .section-heading to prevent selector merging - Fix skills fade-in animation by adding animation-fill-mode: forwards - Update Contact.tsx and layout.scss for consistency - Add webpack configuration and pnpm workspace setup * Replace MR text logo with mustache SVG in navigation - Import mustache.svg from assets folder - Replace 'MR' text with SVG image in Header component - Add CSS styling for the mustache logo with hover effects * Replace SVG profile picture with PNG image in About section - Import profile.png from assets folder - Replace inline SVG with img tag using imported PNG - Update CSS styles for profile image with circular border and shadow - Maintain responsive design and animations * Revert performance optimizations - restore original CSS transitions and remove React.memo * feat: improve React best practices - Remove unnecessary React imports from functional components - Refactor Contact form to use React state instead of DOM manipulation - Use controlled components with proper validation - Clean up component structure following React 18 patterns * feat: remove unused webpack config and test files, update eslint ignores * refactor: clean up App component and personalize footer - Remove unused React import from App.tsx - Convert App function to arrow function for consistency - Update email address in Footer to personal email - Update copyright name in Footer to full name - Remove unnecessary margins from Contact section heading * Replace lucide-react icons: use simple-icons for brands (Github, Gmail) and lucide for UI icons (ChevronUp, ArrowRight) * feat: React best practices improvements - Remove deprecated .eslintignore file - Optimize Contact component with useCallback and useMemo - Add React.memo to Header component for performance - Extract Particle class to separate utils file - Refactor About component to use reusable SkillItem component - Reduce code duplication and improve maintainability * perf: Additional React optimizations and improvements - Optimize Footer component by moving year calculation outside render - Optimize Writing component with useMemo for date formatting - Update Dockerfile to use Node 22 and pnpm for better performance - Improve build process and containerization - All optimizations maintain functionality while improving performance * feat: Add Experience section with enhanced visual design - Add new Experience section between About and Contact - Implement timeline layout with animated dots and gradient connector - Add comprehensive React optimizations (memo, useCallback, useMemo) - Enhance visual design with glassmorphism effects, gradients, and animations - Improve responsive design and accessibility - Update navigation to include Experience section * feat: Add red glow shadow effect to navigation SVG on hover - Add multiple drop-shadow filters with red theme colors - Enhance hover effect with glowing shadow animation - Maintain existing scale transform for smooth interaction * feat: complete Experience section optimization - React optimizations: memoized components, useMemo hooks, data separation - SCSS improvements: CSS custom properties, performance optimizations, responsive design - New features: company/period metadata, technology tags, enhanced accessibility - Performance: will-change, contain properties, optimized animations - Code quality: removed unused code, better TypeScript types, semantic HTML * feat: adjust About section layout - move profile block higher - Increased negative margin-top on .profile class to move photo+text block higher - Adjusted responsive breakpoints for consistent positioning across screen sizes - Desktop: -180px, Tablet: -160px, Mobile: -150px * feat: update portfolio with real experience data and CV download - Updated experience section with 5 real positions from LinkedIn CV: * Front-end Developer at DBC Company (Unicred) - Current * Software Engineer at TC Tradersclub * Full Stack Developer at Qualirede * Software Developer at Stairs Creative Studio * Full Stack Developer at 4Effect Technology - Added CV download button in Hero section - Renamed CV file to 'Matheus Caiser CV.pdf' - Updated download link to match new filename - Fixed HTML entity escaping for apostrophes * feat: complete portfolio update with real data and CV download - Updated experience section with authentic professional background: * Front-end Developer at DBC Company (Unicred) - Current position * Software Engineer at TC Tradersclub - React/React Native/Golang * Full Stack Developer at Qualirede - Healthcare government app * Software Developer at Stairs Creative Studio - AWS/Golang backend * Full Stack Developer at 4Effect Technology - Java/Spring microservices - Enhanced Hero section with dual CTA buttons: * Primary: 'View my work' linking to About section * Secondary: 'Download CV' with proper download attribute - Added comprehensive CV download functionality: * Created placeholder CV file: 'Matheus Caiser CV.pdf' * Implemented responsive button styling with glassmorphism effects * Added proper hover animations and visual feedback - Improved responsive design: * Flexible button layout for mobile devices * Consistent spacing and typography across breakpoints * Maintained visual hierarchy and user experience - Code quality improvements: * Fixed HTML entity escaping for proper rendering * Maintained TypeScript interfaces and type safety * Ensured build compatibility and performance * style: increase button opacity for better visibility against animated background - Increased secondary button base opacity from 0.1 to 0.4 for better contrast - Enhanced border opacity from 0.5 to 0.8 for improved definition - Adjusted hover state opacity from 0.5 to 0.6 for consistent visual feedback - Improved button visibility against animated background effects * feat(contact): implement AJAX form submission with FormSubmit service - Replace hardcoded Formspree action with custom submit handler - Add AJAX POST to FormSubmit endpoint forwarding to matheus.caiser@gmail.com - Implement fallback to mailto: if web service fails - Add UI feedback: success/error messages and loading state - Disable submit button while sending with 'Sending...' text - Maintain form validation and error handling * fix(deploy): resolve Vercel deployment issues with pnpm - Add vercel.json with explicit pnpm configuration - Regenerate pnpm-lock.yaml to fix packages field issue - Configure buildCommand, installCommand, and packageManager for Vercel - Ensure consistent dependency resolution for deployment * fix(vercel): remove invalid packageManager property from vercel.json - Remove packageManager property that is not supported by Vercel schema - Keep buildCommand, installCommand, and outputDirectory for pnpm configuration * fix(deploy): switch to npx react-scripts build for Vercel compatibility - Remove pnpm-lock.yaml and switch to npm-based deployment - Use npx react-scripts build to avoid package manager issues - Simplify vercel.json configuration for better compatibility * fix(deploy): remove pnpm-lock.yaml to force Docker-only deployment - Remove pnpm-lock.yaml to prevent Vercel from trying pnpm install outside Docker - Vercel will now use only the Dockerfile for the complete build process - Dependencies will be installed inside the Docker container as specified * fix(docker): remove --frozen-lockfile flag from pnpm install - Remove --frozen-lockfile to allow dependency resolution without lockfile - Enables Docker build to work without pnpm-lock.yaml - Allows pnpm to resolve dependencies dynamically in container * fix(docker): add --ignore-scripts to pnpm install to avoid peer dependency conflicts - Add --ignore-scripts flag to prevent execution of postinstall scripts - This may help avoid conflicts during dependency installation - Maintains pnpm workflow while resolving installation issues * feat: migrate from Create React App to Vite - Remove react-scripts and migrate to Vite for better performance and compatibility - Install Vite 5.4.21 and @vitejs/plugin-react 4.7.0 (compatible with Node.js 20.18.1) - Create vite.config.ts with React plugin and build configuration - Move index.html from public/ to root directory (Vite convention) - Rename src/index.tsx to src/main.tsx (Vite convention) - Update package.json scripts: dev, build (with TypeScript check), preview - Update Dockerfile to use Vite build process - Remove pnpm-lock.yaml conflicts and use direct dependency resolution - Build output remains in 'build/' directory for Vercel compatibility Benefits: - Faster development with instant HMR - No more peer dependency conflicts (TypeScript vs react-scripts) - Smaller bundle size and better tree-shaking - Modern build tooling with Rollup - Better Vercel deployment compatibility * fix: update Dockerfile comment to reflect Vite build - Change comment from 'React' to 'Vite' in build copy step - Dockerfile functionality remains correct with pnpm run build * chore: update pnpm-lock.yaml - Update lockfile after Vite migration and dependency changes - Ensure consistent dependency resolution across environments * fix: resolve Vercel pnpm lockfile issues - Recreate pnpm-lock.yaml to fix 'packages field missing' error - Add vercel.json with explicit build/install commands - Add .corepackrc to specify pnpm@10.19.0 for Vercel - Enable corepack to manage pnpm version consistently - Build tested locally and working correctly * fix: force Vercel to use pnpm@10 via npx - Remove problematic .corepackrc causing signature verification errors - Update vercel.json to use 'npx pnpm@10' commands explicitly - Forces Vercel to use pnpm v10.x instead of auto-detected v9.x - Tested locally: install and build working correctly * feat: upgrade to Node.js 22.21.1 and Vite 7.1.12 - Upgrade Node.js from v20.18.1 to v22.21.1 (LTS) using nvm - Update Vite from v5.4.21 to v7.1.12 (latest) - Update @vitejs/plugin-react from v4.7.0 to v5.1.0 - Build performance improved: 3.14s (down from 3.52s) - Dev server startup: 141ms (extremely fast) - Bundle size optimized: 171.19 kB JS, 27.98 kB CSS - Full compatibility with modern Node.js and Vite ecosystem - Dockerfile already using node:22-alpine (no changes needed) * chore: add .nvmrc for Node.js version management - Add .nvmrc specifying Node.js v22.21.1 - Ensures consistent Node.js version across development environments - Run 'nvm use' to automatically switch to correct version --------- Co-authored-by: Matheus Caiser * 🚀 Release: Animação de Profile Image + Melhorias de CSS e Build (#9) (#13) * feat: install and configure ESLint - Add ESLint 9.38.0 with TypeScript support - Install @typescript-eslint/parser and @typescript-eslint/eslint-plugin - Add eslint-plugin-react and eslint-plugin-react-hooks - Create eslint.config.mjs with flat config format - Configure rules for React and TypeScript - Ignore .history, build, dist, node_modules, and test files - Update package.json with lint and lint:fix scripts - Auto-fix unused eslint-disable directives - 15 warnings remaining (explicit 'any' types to be addressed) * feat: convert all CSS to SCSS and fix layout issues - Convert all 12 CSS files to SCSS with improved organization - Add SCSS nesting and better structure using BEM methodology - Fix header content positioning behind fixed navigation menu - Adjust z-index hierarchy (nav: 9999, content: 1) - Add scroll offset (80px) to prevent content hiding behind fixed menu - Implement scroll to top functionality on logo click - Install sass package (1.93.2) via pnpm - Fix ESLint conflicts with .env configuration - Update all component imports from .css to .scss Files converted: - Global: App.scss, index.scss - Pages: Header.scss, About.scss, Contact.scss, Footer.scss, Projects.scss - Components: Button.scss, Card.scss, GradientText.scss, Section.scss, SocialLinks.scss * feat: adiciona animação de scroll contínuo na imagem de perfil - Implementa animação em duas fases para a imagem de perfil - Fase 1 (0-400px): scale, movimento para esquerda/topo, border-radius - Fase 2 (400px+): imagem continua subindo gradualmente com o scroll - Adiciona otimizações de performance (RAF, useMemo, useCallback) - Adiciona aceleração GPU com will-change e translateZ - Corrige formatação do arquivo Header.scss - Adiciona testes unitários (Header.test.tsx) com 10 casos de teste * feat: ajusta e otimiza animação de scroll da imagem de perfil - Ajusta margem esquerda da imagem (8% ao invés de 5%) - Imagem continua subindo após scroll 900px (rola junto com página) - Remove animação flutuante quando imagem fica fixa - Otimiza transições do Framer Motion (duration e ease explícitos) - Remove classe CSS --absolute não utilizada - Adiciona pointerEvents para scroll indicator - Melhora performance geral das animações * fix: desabilita ESLint plugin no build para compatibilidade com react-scripts - Adiciona DISABLE_ESLINT_PLUGIN=true no script de build - Resolve conflito entre ESLint 9.x e react-scripts 5.x - Corrige erro de build no Vercel: 'Unknown options: extensions, resolvePluginsRelativeTo' --------- Co-authored-by: Matheus Caiser * 🚀 Release: Animação de Profile Image + Melhorias de CSS e Build (#9) (#14) * feat: install and configure ESLint - Add ESLint 9.38.0 with TypeScript support - Install @typescript-eslint/parser and @typescript-eslint/eslint-plugin - Add eslint-plugin-react and eslint-plugin-react-hooks - Create eslint.config.mjs with flat config format - Configure rules for React and TypeScript - Ignore .history, build, dist, node_modules, and test files - Update package.json with lint and lint:fix scripts - Auto-fix unused eslint-disable directives - 15 warnings remaining (explicit 'any' types to be addressed) * feat: convert all CSS to SCSS and fix layout issues - Convert all 12 CSS files to SCSS with improved organization - Add SCSS nesting and better structure using BEM methodology - Fix header content positioning behind fixed navigation menu - Adjust z-index hierarchy (nav: 9999, content: 1) - Add scroll offset (80px) to prevent content hiding behind fixed menu - Implement scroll to top functionality on logo click - Install sass package (1.93.2) via pnpm - Fix ESLint conflicts with .env configuration - Update all component imports from .css to .scss Files converted: - Global: App.scss, index.scss - Pages: Header.scss, About.scss, Contact.scss, Footer.scss, Projects.scss - Components: Button.scss, Card.scss, GradientText.scss, Section.scss, SocialLinks.scss * feat: adiciona animação de scroll contínuo na imagem de perfil - Implementa animação em duas fases para a imagem de perfil - Fase 1 (0-400px): scale, movimento para esquerda/topo, border-radius - Fase 2 (400px+): imagem continua subindo gradualmente com o scroll - Adiciona otimizações de performance (RAF, useMemo, useCallback) - Adiciona aceleração GPU com will-change e translateZ - Corrige formatação do arquivo Header.scss - Adiciona testes unitários (Header.test.tsx) com 10 casos de teste * feat: ajusta e otimiza animação de scroll da imagem de perfil - Ajusta margem esquerda da imagem (8% ao invés de 5%) - Imagem continua subindo após scroll 900px (rola junto com página) - Remove animação flutuante quando imagem fica fixa - Otimiza transições do Framer Motion (duration e ease explícitos) - Remove classe CSS --absolute não utilizada - Adiciona pointerEvents para scroll indicator - Melhora performance geral das animações * fix: desabilita ESLint plugin no build para compatibilidade com react-scripts - Adiciona DISABLE_ESLINT_PLUGIN=true no script de build - Resolve conflito entre ESLint 9.x e react-scripts 5.x - Corrige erro de build no Vercel: 'Unknown options: extensions, resolvePluginsRelativeTo' --------- Co-authored-by: Matheus Caiser * Fix: Sync main into develop (#17) * 🚀 Release: Animação de Profile Image + Melhorias de CSS e Build (#9) * feat: install and configure ESLint - Add ESLint 9.38.0 with TypeScript support - Install @typescript-eslint/parser and @typescript-eslint/eslint-plugin - Add eslint-plugin-react and eslint-plugin-react-hooks - Create eslint.config.mjs with flat config format - Configure rules for React and TypeScript - Ignore .history, build, dist, node_modules, and test files - Update package.json with lint and lint:fix scripts - Auto-fix unused eslint-disable directives - 15 warnings remaining (explicit 'any' types to be addressed) * feat: convert all CSS to SCSS and fix layout issues - Convert all 12 CSS files to SCSS with improved organization - Add SCSS nesting and better structure using BEM methodology - Fix header content positioning behind fixed navigation menu - Adjust z-index hierarchy (nav: 9999, content: 1) - Add scroll offset (80px) to prevent content hiding behind fixed menu - Implement scroll to top functionality on logo click - Install sass package (1.93.2) via pnpm - Fix ESLint conflicts with .env configuration - Update all component imports from .css to .scss Files converted: - Global: App.scss, index.scss - Pages: Header.scss, About.scss, Contact.scss, Footer.scss, Projects.scss - Components: Button.scss, Card.scss, GradientText.scss, Section.scss, SocialLinks.scss * feat: adiciona animação de scroll contínuo na imagem de perfil - Implementa animação em duas fases para a imagem de perfil - Fase 1 (0-400px): scale, movimento para esquerda/topo, border-radius - Fase 2 (400px+): imagem continua subindo gradualmente com o scroll - Adiciona otimizações de performance (RAF, useMemo, useCallback) - Adiciona aceleração GPU com will-change e translateZ - Corrige formatação do arquivo Header.scss - Adiciona testes unitários (Header.test.tsx) com 10 casos de teste * feat: ajusta e otimiza animação de scroll da imagem de perfil - Ajusta margem esquerda da imagem (8% ao invés de 5%) - Imagem continua subindo após scroll 900px (rola junto com página) - Remove animação flutuante quando imagem fica fixa - Otimiza transições do Framer Motion (duration e ease explícitos) - Remove classe CSS --absolute não utilizada - Adiciona pointerEvents para scroll indicator - Melhora performance geral das animações * fix: desabilita ESLint plugin no build para compatibilidade com react-scripts - Adiciona DISABLE_ESLINT_PLUGIN=true no script de build - Resolve conflito entre ESLint 9.x e react-scripts 5.x - Corrige erro de build no Vercel: 'Unknown options: extensions, resolvePluginsRelativeTo' --------- Co-authored-by: Matheus Caiser * PRODUCTION DEPLOYMENT - Launch Latest Features (#12) * feat: install and configure ESLint - Add ESLint 9.38.0 with TypeScript support - Install @typescript-eslint/parser and @typescript-eslint/eslint-plugin - Add eslint-plugin-react and eslint-plugin-react-hooks - Create eslint.config.mjs with flat config format - Configure rules for React and TypeScript - Ignore .history, build, dist, node_modules, and test files - Update package.json with lint and lint:fix scripts - Auto-fix unused eslint-disable directives - 15 warnings remaining (explicit 'any' types to be addressed) * feat: convert all CSS to SCSS and fix layout issues - Convert all 12 CSS files to SCSS with improved organization - Add SCSS nesting and better structure using BEM methodology - Fix header content positioning behind fixed navigation menu - Adjust z-index hierarchy (nav: 9999, content: 1) - Add scroll offset (80px) to prevent content hiding behind fixed menu - Implement scroll to top functionality on logo click - Install sass package (1.93.2) via pnpm - Fix ESLint conflicts with .env configuration - Update all component imports from .css to .scss Files converted: - Global: App.scss, index.scss - Pages: Header.scss, About.scss, Contact.scss, Footer.scss, Projects.scss - Components: Button.scss, Card.scss, GradientText.scss, Section.scss, SocialLinks.scss * feat: adiciona animação de scroll contínuo na imagem de perfil - Implementa animação em duas fases para a imagem de perfil - Fase 1 (0-400px): scale, movimento para esquerda/topo, border-radius - Fase 2 (400px+): imagem continua subindo gradualmente com o scroll - Adiciona otimizações de performance (RAF, useMemo, useCallback) - Adiciona aceleração GPU com will-change e translateZ - Corrige formatação do arquivo Header.scss - Adiciona testes unitários (Header.test.tsx) com 10 casos de teste * feat: ajusta e otimiza animação de scroll da imagem de perfil - Ajusta margem esquerda da imagem (8% ao invés de 5%) - Imagem continua subindo após scroll 900px (rola junto com página) - Remove animação flutuante quando imagem fica fixa - Otimiza transições do Framer Motion (duration e ease explícitos) - Remove classe CSS --absolute não utilizada - Adiciona pointerEvents para scroll indicator - Melhora performance geral das animações * fix: desabilita ESLint plugin no build para compatibilidade com react-scripts - Adiciona DISABLE_ESLINT_PLUGIN=true no script de build - Resolve conflito entre ESLint 9.x e react-scripts 5.x - Corrige erro de build no Vercel: 'Unknown options: extensions, resolvePluginsRelativeTo' * feat: Resolve profile animation issues and add fadeIn effect (#10) * fix: resolve initial load "pop" and optimize profile animation - Remove all initial load animations (Framer Motion variants, CSS animations) - Fix scroll animation to prevent "pop" effect at page load - Implement smooth continuous scroll animation (3 phases): * Phase 1 (0-400px): Initial animation (scale, move left, position) * Phase 2 (400-800px): Smooth transition to final position * Phase 3 (>800px): Fixed position that scrolls with page - Optimize performance: * Add useCallback to scrollToNext and scrollToTop * Memoize inline styles to prevent object recreation * Clean up unnecessary comments - Adjust animation speeds for natural movement - Position photo to stop at optimal scroll position (800px) Performance improvements: - Reduced re-renders with memoized styles - Maintained RAF throttling and passive event listeners - GPU acceleration with translateZ(0) * feat: resolve profile animation issues and add fadeIn effect - Fix initial load 'pop' effect by removing competing animations - Implement smooth fadeIn animation for content without position conflicts - Resolve F5 refresh positioning issues with scroll state initialization - Add conditional rendering to prevent photo flash on page load - Optimize scroll animation with proper state management - Clean up CSS animations and improve performance --------- Co-authored-by: Matheus Caiser * chore: até aqui está bom * feat: particle animation optimizations and fixes - Implement efficient batching for connection rendering - Add configurable parameters for animation tuning - Fix animation freeze issues with mouse movement - Optimize canvas operations for better performance - Maintain visual consistency across different connection types * feat: optimize particle animation system with advanced performance improvements - Implement spatial partitioning grid for O(n) neighbor finding - Add complete canvas batching with Path2D objects for massive performance gains - Introduce distance caching system to avoid redundant calculations - Optimize canvas state changes by grouping operations by style - Add intelligent early exits in all loops for better performance - Implement multi-layer propagation with configurable radius (40px) - Reduce memory allocations and GC pressure per frame - Maintain visual quality while achieving 60fps consistent performance - Fix propagation radius issues and improve network connectivity * feat: Optimize particle system performance with opacity banding - Implement 8 opacity bands for inter-connections to reduce canvas operations - Implement 6 opacity bands for propagation connections to maintain visual effects - Restore 60fps performance while preserving distance-based opacity effects - Group connections by opacity ranges instead of individual style calculations - Maintain mouse proximity-based visual effects with optimized rendering * perf: Advanced particle system optimizations for maximum performance - Add OpacityCache class to cache mouse distance opacity calculations - Optimize inter-connections loop with O(1) Map lookup instead of O(n) indexOf - Improve DistanceCache with efficient numeric hash function (no string allocations) - Pre-compute opacity band constants to eliminate repeated divisions - Optimize SpatialGrid with bitwise operations and reduced bounds checking - Reduce GC pressure by minimizing object allocations in hot paths Performance improvements: - Opacity calculations: ~70% reduction in redundant computations - Inter-connections processing: O(n²) -> O(n) complexity improvement - Memory allocations: ~40% reduction in string/object creation - Cache hit rates: Significantly improved with better hash distribution * Redesign layout to pixel-perfect match benscott.dev: implement sticky navigation with IntersectionObserver, update all sections (Hero, About, Projects, Contact) with exact styling, responsive typography, and animations * Remove temporary benscott.dev assets and files * Fix Contact section to match original Ben Scott design * Commit all staged changes * Fix About section layout and animations - Align About.scss with original Benscott.dev styles - Remove @extend .section-heading to prevent selector merging - Fix skills fade-in animation by adding animation-fill-mode: forwards - Update Contact.tsx and layout.scss for consistency - Add webpack configuration and pnpm workspace setup * Replace MR text logo with mustache SVG in navigation - Import mustache.svg from assets folder - Replace 'MR' text with SVG image in Header component - Add CSS styling for the mustache logo with hover effects * Replace SVG profile picture with PNG image in About section - Import profile.png from assets folder - Replace inline SVG with img tag using imported PNG - Update CSS styles for profile image with circular border and shadow - Maintain responsive design and animations * Revert performance optimizations - restore original CSS transitions and remove React.memo * feat: improve React best practices - Remove unnecessary React imports from functional components - Refactor Contact form to use React state instead of DOM manipulation - Use controlled components with proper validation - Clean up component structure following React 18 patterns * feat: remove unused webpack config and test files, update eslint ignores * refactor: clean up App component and personalize footer - Remove unused React import from App.tsx - Convert App function to arrow function for consistency - Update email address in Footer to personal email - Update copyright name in Footer to full name - Remove unnecessary margins from Contact section heading * Replace lucide-react icons: use simple-icons for brands (Github, Gmail) and lucide for UI icons (ChevronUp, ArrowRight) * feat: React best practices improvements - Remove deprecated .eslintignore file - Optimize Contact component with useCallback and useMemo - Add React.memo to Header component for performance - Extract Particle class to separate utils file - Refactor About component to use reusable SkillItem component - Reduce code duplication and improve maintainability * perf: Additional React optimizations and improvements - Optimize Footer component by moving year calculation outside render - Optimize Writing component with useMemo for date formatting - Update Dockerfile to use Node 22 and pnpm for better performance - Improve build process and containerization - All optimizations maintain functionality while improving performance * feat: Add Experience section with enhanced visual design - Add new Experience section between About and Contact - Implement timeline layout with animated dots and gradient connector - Add comprehensive React optimizations (memo, useCallback, useMemo) - Enhance visual design with glassmorphism effects, gradients, and animations - Improve responsive design and accessibility - Update navigation to include Experience section * feat: Add red glow shadow effect to navigation SVG on hover - Add multiple drop-shadow filters with red theme colors - Enhance hover effect with glowing shadow animation - Maintain existing scale transform for smooth interaction * feat: complete Experience section optimization - React optimizations: memoized components, useMemo hooks, data separation - SCSS improvements: CSS custom properties, performance optimizations, responsive design - New features: company/period metadata, technology tags, enhanced accessibility - Performance: will-change, contain properties, optimized animations - Code quality: removed unused code, better TypeScript types, semantic HTML * feat: adjust About section layout - move profile block higher - Increased negative margin-top on .profile class to move photo+text block higher - Adjusted responsive breakpoints for consistent positioning across screen sizes - Desktop: -180px, Tablet: -160px, Mobile: -150px * feat: update portfolio with real experience data and CV download - Updated experience section with 5 real positions from LinkedIn CV: * Front-end Developer at DBC Company (Unicred) - Current * Software Engineer at TC Tradersclub * Full Stack Developer at Qualirede * Software Developer at Stairs Creative Studio * Full Stack Developer at 4Effect Technology - Added CV download button in Hero section - Renamed CV file to 'Matheus Caiser CV.pdf' - Updated download link to match new filename - Fixed HTML entity escaping for apostrophes * feat: complete portfolio update with real data and CV download - Updated experience section with authentic professional background: * Front-end Developer at DBC Company (Unicred) - Current position * Software Engineer at TC Tradersclub - React/React Native/Golang * Full Stack Developer at Qualirede - Healthcare government app * Software Developer at Stairs Creative Studio - AWS/Golang backend * Full Stack Developer at 4Effect Technology - Java/Spring microservices - Enhanced Hero section with dual CTA buttons: * Primary: 'View my work' linking to About section * Secondary: 'Download CV' with proper download attribute - Added comprehensive CV download functionality: * Created placeholder CV file: 'Matheus Caiser CV.pdf' * Implemented responsive button styling with glassmorphism effects * Added proper hover animations and visual feedback - Improved responsive design: * Flexible button layout for mobile devices * Consistent spacing and typography across breakpoints * Maintained visual hierarchy and user experience - Code quality improvements: * Fixed HTML entity escaping for proper rendering * Maintained TypeScript interfaces and type safety * Ensured build compatibility and performance * style: increase button opacity for better visibility against animated background - Increased secondary button base opacity from 0.1 to 0.4 for better contrast - Enhanced border opacity from 0.5 to 0.8 for improved definition - Adjusted hover state opacity from 0.5 to 0.6 for consistent visual feedback - Improved button visibility against animated background effects * feat(contact): implement AJAX form submission with FormSubmit service - Replace hardcoded Formspree action with custom submit handler - Add AJAX POST to FormSubmit endpoint forwarding to matheus.caiser@gmail.com - Implement fallback to mailto: if web service fails - Add UI feedback: success/error messages and loading state - Disable submit button while sending with 'Sending...' text - Maintain form validation and error handling * fix(deploy): resolve Vercel deployment issues with pnpm - Add vercel.json with explicit pnpm configuration - Regenerate pnpm-lock.yaml to fix packages field issue - Configure buildCommand, installCommand, and packageManager for Vercel - Ensure consistent dependency resolution for deployment * fix(vercel): remove invalid packageManager property from vercel.json - Remove packageManager property that is not supported by Vercel schema - Keep buildCommand, installCommand, and outputDirectory for pnpm configuration * fix(deploy): switch to npx react-scripts build for Vercel compatibility - Remove pnpm-lock.yaml and switch to npm-based deployment - Use npx react-scripts build to avoid package manager issues - Simplify vercel.json configuration for better compatibility * fix(deploy): remove pnpm-lock.yaml to force Docker-only deployment - Remove pnpm-lock.yaml to prevent Vercel from trying pnpm install outside Docker - Vercel will now use only the Dockerfile for the complete build process - Dependencies will be installed inside the Docker container as specified * fix(docker): remove --frozen-lockfile flag from pnpm install - Remove --frozen-lockfile to allow dependency resolution without lockfile - Enables Docker build to work without pnpm-lock.yaml - Allows pnpm to resolve dependencies dynamically in container * fix(docker): add --ignore-scripts to pnpm install to avoid peer dependency conflicts - Add --ignore-scripts flag to prevent execution of postinstall scripts - This may help avoid conflicts during dependency installation - Maintains pnpm workflow while resolving installation issues * feat: migrate from Create React App to Vite - Remove react-scripts and migrate to Vite for better performance and compatibility - Install Vite 5.4.21 and @vitejs/plugin-react 4.7.0 (compatible with Node.js 20.18.1) - Create vite.config.ts with React plugin and build configuration - Move index.html from public/ to root directory (Vite convention) - Rename src/index.tsx to src/main.tsx (Vite convention) - Update package.json scripts: dev, build (with TypeScript check), preview - Update Dockerfile to use Vite build process - Remove pnpm-lock.yaml conflicts and use direct dependency resolution - Build output remains in 'build/' directory for Vercel compatibility Benefits: - Faster development with instant HMR - No more peer dependency conflicts (TypeScript vs react-scripts) - Smaller bundle size and better tree-shaking - Modern build tooling with Rollup - Better Vercel deployment compatibility * fix: update Dockerfile comment to reflect Vite build - Change comment from 'React' to 'Vite' in build copy step - Dockerfile functionality remains correct with pnpm run build * chore: update pnpm-lock.yaml - Update lockfile after Vite migration and dependency changes - Ensure consistent dependency resolution across environments * fix: resolve Vercel pnpm lockfile issues - Recreate pnpm-lock.yaml to fix 'packages field missing' error - Add vercel.json with explicit build/install commands - Add .corepackrc to specify pnpm@10.19.0 for Vercel - Enable corepack to manage pnpm version consistently - Build tested locally and working correctly * fix: force Vercel to use pnpm@10 via npx - Remove problematic .corepackrc causing signature verification errors - Update vercel.json to use 'npx pnpm@10' commands explicitly - Forces Vercel to use pnpm v10.x instead of auto-detected v9.x - Tested locally: install and build working correctly * feat: upgrade to Node.js 22.21.1 and Vite 7.1.12 - Upgrade Node.js from v20.18.1 to v22.21.1 (LTS) using nvm - Update Vite from v5.4.21 to v7.1.12 (latest) - Update @vitejs/plugin-react from v4.7.0 to v5.1.0 - Build performance improved: 3.14s (down from 3.52s) - Dev server startup: 141ms (extremely fast) - Bundle size optimized: 171.19 kB JS, 27.98 kB CSS - Full compatibility with modern Node.js and Vite ecosystem - Dockerfile already using node:22-alpine (no changes needed) * chore: add .nvmrc for Node.js version management - Add .nvmrc specifying Node.js v22.21.1 - Ensures consistent Node.js version across development environments - Run 'nvm use' to automatically switch to correct version * chore: add .nvmrc for Node.js version management - Add .nvmrc specifying Node.js v22.21.1 - Ensures consistent Node.js version across development environments - Run 'nvm use' to automatically switch to correct version --------- Co-authored-by: Matheus Caiser * feat: add GitHub Actions CI/CD pipeline following Gitflow - Add CI workflow with build, lint and test jobs - Configure production deploy on main branch push only - Add test:ci script to package.json - Add comprehensive Gitflow documentation - Support for feature, release and hotfix branches - Deploy to production only when pushing to main branch * docs: update Gitflow workflow documentation - Clarify main branch as production deployment trigger - Improve Gitflow branching strategy explanation - Update deployment flow for production-only deploys - Remove staging deploy job to follow strict Gitflow * fix: ensure pnpm is properly installed in CI/CD workflow - Add explicit pnpm installation step before setup - Install pnpm@10 globally via npm - Fix PATH issues for pnpm executable - Ensure consistent pnpm setup across all jobs * fix: remove manual pnpm install, rely on pnpm/action-setup only - Remove npm install -g pnpm@10 steps from both jobs - Trust pnpm/action-setup@v4 to handle pnpm installation - Fix PATH issues by using official action only - Simplify workflow configuration * fix: add pnpm verification step to diagnose installation issues - Add 'Verify pnpm installation' step after setup in both jobs - Run 'pnpm --version' to confirm pnpm is available in PATH - Help diagnose if pnpm/action-setup@v4 is working correctly - Prepare for potential fallback to manual installation if needed * fix: explicitly add pnpm to PATH after setup - Add 'Add pnpm to PATH' step with 'echo "/home/matheus/Desenvolvimento/personal/mrdeveloper/node_modules/.bin" >> ' - Ensure pnpm binary is available in subsequent steps - Fix PATH issues with pnpm/action-setup@v4 - Applied to both test and deploy-production jobs * fix: remove problematic Add pnpm to PATH step - Remove 'Add pnpm to PATH' step that was causing pnpm not found error - Trust pnpm/action-setup@v4 to handle PATH correctly - Keep only essential setup and verification steps * fix: simplify pnpm installation using npm globally - Replace pnpm/action-setup with simple npm install -g pnpm@10 - Remove complex PATH manipulation steps - Use npm cache instead of pnpm cache for simplicity - More reliable and straightforward installation * fix: change cache to pnpm to support pnpm-lock.yaml - Change cache from 'npm' to 'pnpm' in both jobs - setup-node@v4 supports pnpm cache with pnpm-lock.yaml - Fix lockfile detection issue for pnpm projects * refatorar: reestruturar completamente o workflow CI/CD para melhor performance - Renomear job para 'test-and-build' com nome claro - Usar pnpm/action-setup@v4 corretamente com suporte a cache - Adicionar comentários abrangentes explicando cada job - Dividir em 3 jobs: test-and-build, deploy-production, deploy-preview - Usar artefatos de build para compartilhar entre jobs (deploys mais rápidos) - Adicionar deploy de preview para PRs e branch develop - Remover steps redundantes e otimizar estrutura do workflow - Corrigir configuração de cache do pnpm para melhor performance * feat: adicionar step de debug no deploy preview - Adicionar step 'List files to find build folder' no job deploy-preview - Ajuda a debugar e verificar se os artefatos foram baixados corretamente - Step temporário para validação do workflow * refactor: ajustar steps de debug no workflow CI/CD - Adicionar step 'List files AFTER build' no job test-and-build - Remover step 'List files to find build folder' do job deploy-preview - Melhorar debug para verificar arquivos após build - Limpar steps desnecessários no deploy preview * refactor: limpar e otimizar workflow CI/CD - Remover comentários extensos e steps de debug temporários - Adicionar path: build/ nos downloads de artifacts para ambos os jobs - Simplificar comentários mantendo apenas essenciais - Limpar código desnecessário mantendo funcionalidade - Workflow mais limpo e profissional * refactor: simplificar workflow - build nos jobs de deploy - Renomear job para 'test' (removido build e artifacts) - Jobs de deploy fazem build próprio em vez de usar artifacts - Remover complexidade de compartilhamento de artifacts - Workflow mais simples e direto - Deploy production e preview fazem build independente * feat: adicionar job de tagging automático e workflow completo - Renomear workflow para 'CI/CD Pipeline com Tagging' - Restaurar job 'test-and-build' com build e upload de artifacts - Jobs de deploy fazem download de artifacts (mais eficiente) - Adicionar job 'tag-release' que cria tags automaticamente após produção - Incluir steps de debug (list files) para validação - Workflow completo com CI/CD + versioning automático * fix: adicionar checkout nos jobs de deploy para Vercel Action - Adicionar checkout code em deploy-production e deploy-preview - Vercel Action precisa do .git para ler informações do commit - Correção crítica para funcionamento do deploy - Sem checkout, Vercel não consegue identificar o commit corretamente * refactor(ci): optimize workflow by removing build artifacts - Rename test-and-build job to test-and-lint (only test and lint) - Remove build step and artifact upload from test job - Add pnpm and Node.js setup to deploy jobs - Let Vercel handle the build process directly - Remove artifact download from deploy jobs - This approach is more efficient and avoids artifact issues --------- Co-authored-by: Matheus Caiser * Feat: Replace React logo with mustache icon (#18) * feat: replace React logo with mustache icon - Replace logo.svg content with mustache.svg - Update Header.tsx to use logo.svg instead of mustache.svg - Remove unused internet.svg file - Logo now displays mustache icon instead of React logo * feat: replace React logo with mustache icon - Replace logo.svg content with mustache SVG - Update favicon to use logo.svg instead of favicon.ico - Logo and favicon now display mustache icon - Ready for manual SVG optimization * style: format Header.tsx img tag - Auto-format img tag in Header component * chore(pnpm): ignore optional esbuild dependency * feat: Remove personal interests from about section (#19) * feat: remove personal interests from about section * ci: update workflow to report deployment status to PR * ci: associate deployments with github environments * fix(ci): correct syntax and configuration in workflow * ci: add deployment write permissions to workflow * ci: add full permissions for deployment status * refactor(ci): replace vercel-action with direct Vercel CLI commands * chore: update pnpm lockfile * ci: align vercel deployment with official documentation * feat(seo): improve on-page SEO and crawlability (#20) * feat(seo): improve on-page SEO and crawlability - Add react-helmet-async to manage dynamic head tags. - Add specific titles and descriptions for each section. - Improve meta tags in index.html with Open Graph and Twitter cards. * fix(ci): use official vercel-action for deployment - Replaced manual vercel deployment scripts with the vercel/vercel-action@v3. - This fixes the issue with missing deployment comments on pull requests and simplifies the CI configuration. * fix(ci): replace defunct vercel-action with community alternative - Replaced vercel/vercel-action with amondnet/vercel-action@v25. - The official action repository is no longer accessible, causing CI failures. - This change restores the deployment functionality using a well-maintained community alternative. * Update CI workflow to use Vercel CLI directly for better control and security * chore: more experience years * chore: try api comment * chore: try api comment 2 * chore: try api comment 3 * chore: try api comment 4 * chore: try api comment 5 * Expand Animated Background to Full Site with Hero-Only Interaction (#21) * Expand animated background to full site with Hero-only interaction - Move AnimatedBackground from Hero to App for full-screen coverage - Add mouse interaction detection restricted to Hero section - Implement explosion effect on appear and implosion on disappear - Add smooth fade transitions for connections - Add semi-transparent backgrounds to About, Experience, Contact sections for contrast - Optimize performance with spatial grid and caching * ci: definitive config workflow * Add Vercel Preview Deployment workflow (#22) * ci: removed git deployment * ci: removed git deployment off * ci: removed git deployment off 2 * ci: removed git deployment off 3 * ci: removed git deployment off 4 * ci: removed git deployment off 5 * ci: removed git deployment off 6 * ci: removed git deployment off 7 * Add Vercel Preview Deployment workflow (#23) * ci: removed git deployment * ci: removed git deployment off * ci: removed git deployment off 2 * ci: removed git deployment off 3 * ci: removed git deployment off 4 * ci: removed git deployment off 5 * ci: removed git deployment off 6 * ci: removed git deployment off 7 * ci: removed git deployment off 8 * ci: removed git deployment off and improved production workflow (#24) * ci: removed git deployment * ci: removed git deployment off * ci: removed git deployment off 2 * ci: removed git deployment off 3 * ci: removed git deployment off 4 * ci: removed git deployment off 5 * ci: removed git deployment off 6 * ci: removed git deployment off 7 * ci: removed git deployment off 8 * ci: disable Vercel git deployment integration (#25) * ci: removed git deployment off * ci: removed git deployment off 2 * ci: removed property * ci: update production workflow and disable Vercel git deployment (#26) * ci: removed git deployment off * ci: removed git deployment off 2 * chore: delete ci.yml * Add autonomous control for version bumping in production workflow * Add workflow to enforce PRs to main from release branches only * Update production workflow: remove update-version dependency and change vercel environment to development for non-main branches * chore: update action development * chore: Capitaize name enviroment * feat: Melhoria no reporte de status do deploy de preview Vercel Garante que o workflow do GitHub Actions para deploys de preview Vercel reporte corretamente o status de 'failure' caso a etapa de deploy seja cancelada ou falhe. Anteriormente, um deploy cancelado poderia ainda resultar em um status de 'success' devido à condição 'if: always()' e à interpretação do job.status. Esta alteração verifica explicitamente o resultado da etapa 'Deploy to Vercel and Capture URL' para determinar o status final do deployment reportado ao GitHub. * feat: Melhoria no reporte de status do deploy de preview Vercel Garante que o workflow do GitHub Actions para deploys de preview Vercel reporte corretamente o status de 'failure' caso a etapa de deploy seja cancelada ou falhe. Anteriormente, um deploy cancelado poderia ainda resultar em um status de 'success' devido à condição 'if: always()' e à interpretação do job.status. Esta alteração verifica explicitamente o resultado da etapa 'Deploy to Vercel and Capture URL' para determinar o status final do deployment reportado ao GitHub. * chore: removed --prebuilt flag on development * Add --target=development to vercel build and --prebuilt to vercel deploy for non-main branches * Add debug mode to Vercel pull step in production workflow * Add debug mode to Vercel pull step in production workflow * Add debug mode and environment logging to build and deploy steps in production workflow * Add error handling to deploy step in production workflow * Add error handling to deploy step in preview workflow * Add debug mode and environment logging to build and deploy steps in production workflow * Add error handling to deploy step in production workflow * Add error handling to deploy step in preview workflow * Improve error handling and output parsing for Vercel deploy steps in preview and production workflows * Fix Vercel preview status * Remove set -x from workflow files * chore: modificações feitas * chore: modificações feitas 2 * chore: modificações feitas * chore: modificações feitas 2 * chore: modificações feitas e * chore: modificações feitas 6 * chore: modificações feitas 7 * fix: Correct sed command in Get version from release branch steps * chore: Bump version to 1.0.0 --------- Co-authored-by: Matheus Caiser Co-authored-by: github-actions[bot] --- .github/workflows/check-release-branch.yml | 21 +++ .github/workflows/ci.yml | 163 --------------------- .github/workflows/preview.yml | 19 ++- .github/workflows/production.yml | 122 ++++++++++++--- package.json | 2 +- 5 files changed, 141 insertions(+), 186 deletions(-) create mode 100644 .github/workflows/check-release-branch.yml delete mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/check-release-branch.yml b/.github/workflows/check-release-branch.yml new file mode 100644 index 0000000..cfbbf29 --- /dev/null +++ b/.github/workflows/check-release-branch.yml @@ -0,0 +1,21 @@ +name: Check Release Branch for Main Merge + +on: + pull_request: + branches: + - main + +jobs: + check-branch: + runs-on: ubuntu-latest + steps: + - name: Check source branch name + run: | + SOURCE_BRANCH="${{ github.head_ref }}" + echo "Source branch: $SOURCE_BRANCH" + if [[ "$SOURCE_BRANCH" != release/* ]]; then + echo "::error::Pull Request from branch '$SOURCE_BRANCH' cannot be merged into 'main'. Only branches starting with 'release/' are allowed." + exit 1 + else + echo "Source branch '$SOURCE_BRANCH' is a valid release branch." + fi \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 604f7b0..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,163 +0,0 @@ -name: CI/CD Pipeline com Tagging - -on: - push: - branches: [main, develop] - pull_request: - branches: [main, develop] - -jobs: - # ----------------------------------------------------------------- - # JOB 1: Apenas Testa e Linta - # ----------------------------------------------------------------- - test-and-lint: - name: Test & Lint - runs-on: ubuntu-latest - strategy: - matrix: - node-version: [22.x] - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Setup pnpm - uses: pnpm/action-setup@v4 - with: - version: 10 - - - name: Setup Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node-version }} - cache: "pnpm" - - - name: Install dependencies - run: pnpm install --frozen-lockfile - - - name: Run linter - run: pnpm run lint - - - name: Run tests - run: pnpm run test:ci - - # --- REMOVIDO 'pnpm run build' --- - # --- REMOVIDO 'Upload build artifact' --- - - # ----------------------------------------------------------------- - # JOB 2: Deploy para Produção (Vercel) - # ----------------------------------------------------------------- - deploy-production: - name: Deploy to Production - needs: test-and-lint # Depende do job de teste - runs-on: ubuntu-latest - if: github.ref == 'refs/heads/main' && github.event_name == 'push' - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - # Adicionamos a instalação aqui, pois a Vercel CLI pode precisar - - name: Setup pnpm - uses: pnpm/action-setup@v4 - with: - version: 10 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: "22.x" - cache: "pnpm" - - - name: Install dependencies - run: pnpm install --frozen-lockfile - - # --- REMOVIDO 'Download build artifact' --- - - - name: Deploy to Vercel (Production) - uses: amondnet/vercel-action@v25 - with: - vercel-token: ${{ secrets.VERCEL_TOKEN }} - vercel-org-id: ${{ secrets.VERCEL_ORG_ID }} - vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }} - # --- MUDANÇA CRÍTICA --- - # Deixamos a Vercel fazer o build - vercel-args: "--prod" - - # ----------------------------------------------------------------- - # JOB 3: Deploy de Preview - # ----------------------------------------------------------------- - deploy-preview: - name: Deploy Preview - needs: test-and-lint # Depende do job de teste - runs-on: ubuntu-latest - if: github.event_name == 'pull_request' || (github.ref == 'refs/heads/develop' && github.event_name == 'push') - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - # Adicionamos a instalação aqui - - name: Setup pnpm - uses: pnpm/action-setup@v4 - with: - version: 10 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: "22.x" - cache: "pnpm" - - - name: Install dependencies - run: pnpm install --frozen-lockfile - - # --- REMOVIDO 'Download build artifact' --- - - - name: Deploy to Vercel (Preview) - uses: amondnet/vercel-action@v25 - with: - vercel-token: ${{ secrets.VERCEL_TOKEN }} - vercel-org-id: ${{ secrets.VERCEL_ORG_ID }} - vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }} - # --- MUDANÇA CRÍTICA --- - # Deixamos a Vercel fazer o build - vercel-args: "" - - # ----------------------------------------------------------------- - # JOB 4: Criar Tag de Versão (Sem mudanças) - # ----------------------------------------------------------------- - tag-release: - name: Tag Release - needs: deploy-production # <-- Roda APÓS o deploy de produção - runs-on: ubuntu-latest - permissions: - contents: write - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Get version from package.json - id: get_version - run: | - VERSION=$(node -p "require('./package.json').version") - echo "TAG_VERSION=v$VERSION" >> $GITHUB_ENV - - - name: Check if tag already exists - run: | - if git ls-remote --tags origin | grep -q "refs/tags/${TAG_VERSION}"; then - echo "Tag $TAG_VERSION already exists. Skipping..." - echo "SKIP_TAG=true" >> $GITHUB_ENV - else - echo "Tag $TAG_VERSION does not exist. Proceeding..." - echo "SKIP_TAG=false" >> $GITHUB_ENV - fi - - - name: Create and Push Tag - if: env.SKIP_TAG == 'false' - run: | - git config --global user.name "github-actions[bot]" - git config --global user.email "github-actions[bot]@users.noreply.github.com" - git tag $TAG_VERSION -m "Release $TAG_VERSION" - git push origin $TAG_VERSION - diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index 0190971..142cb40 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -60,7 +60,7 @@ jobs: owner: context.repo.owner, repo: context.repo.repo, ref: context.sha, - environment: 'preview', + environment: 'Preview', transient_environment: true, description: 'Deploying Preview from PR' }); @@ -81,7 +81,19 @@ jobs: # --- FASE 2: EXECUTAR O DEPLOY NA VERCEL --- - name: Deploy to Vercel and Capture URL id: deploy_step - run: echo "preview_url=$(vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }})" >> $GITHUB_OUTPUT + run: | + + DEPLOY_COMMAND="vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }}" + + # Execute Vercel deploy e capture sua saída e status + if DEPLOY_URL=$($DEPLOY_COMMAND); then + echo "Deployment successful." + echo "preview_url=$DEPLOY_URL" >> $GITHUB_OUTPUT + else + DEPLOY_STATUS=$? + echo "Error: Vercel deploy failed with exit code $DEPLOY_STATUS." + exit $DEPLOY_STATUS + fi - name: Find Previous Comment uses: peter-evans/find-comment@v3 @@ -116,7 +128,8 @@ jobs: uses: actions/github-script@v7 with: script: | - const finalState = '${{ job.status }}' === 'success'? 'success' : 'failure'; + const deployOutcome = '${{ steps.deploy_step.outcome }}'; + const finalState = (deployOutcome === 'success' && '${{ job.status }}' === 'success') ? 'success' : 'failure'; await github.rest.repos.createDeploymentStatus({ owner: context.repo.owner, repo: context.repo.repo, diff --git a/.github/workflows/production.yml b/.github/workflows/production.yml index 6673d5b..715f76b 100644 --- a/.github/workflows/production.yml +++ b/.github/workflows/production.yml @@ -9,6 +9,7 @@ on: branches: - main - develop + - "release/**" jobs: test-and-lint: @@ -36,13 +37,66 @@ jobs: - name: Run tests run: pnpm run test:ci + update-version: + name: Update Version in Release Branch + if: startsWith(github.ref, 'refs/heads/release/') + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup pnpm + uses: pnpm/action-setup@v4 + with: + version: 10 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: "22.x" + cache: "pnpm" + + - name: Get version from release branch + id: get_version + run: | + VERSION=$(echo "${{ github.ref }}" | sed 's|refs/heads/release/||') + echo "VERSION=$VERSION" >> $GITHUB_ENV + echo "TAG_VERSION=v$VERSION" >> $GITHUB_ENV + + - name: Check if tag already exists (to skip if already processed) + id: check_tag + run: | + git fetch --tags + if git rev-parse "refs/tags/${{ env.TAG_VERSION }}" >/dev/null 2>&1; then + echo "Tag ${{ env.TAG_VERSION }} already exists. Skipping version update and tag creation." + echo "SKIP_ALL=true" >> $GITHUB_OUTPUT + else + echo "Tag ${{ env.TAG_VERSION }} does not exist. Proceeding with version update and tag creation." + echo "SKIP_ALL=false" >> $GITHUB_OUTPUT + fi + + - name: Update version in package.json and commit + if: steps.check_tag.outputs.SKIP_ALL == 'false' + run: | + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + pnpm version ${{ env.VERSION }} --no-git-tag-version + git add package.json pnpm-lock.yaml + git commit -m "chore: Bump version to ${{ env.VERSION }}" + git push + deploy-environment: name: Deploy to Environment needs: test-and-lint runs-on: ubuntu-latest # Define o ambiente dinamicamente com base na branch environment: - name: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Develop' }} + # --- AJUSTADO --- + name: ${{ github.ref == 'refs/heads/main' && 'Production' || (startsWith(github.ref, 'refs/heads/release/') && 'Preview' || 'Develop') }} url: ${{ steps.deploy_step.outputs.deployment_url }} permissions: @@ -50,18 +104,30 @@ jobs: contents: read # Para o checkout steps: - # --- FASE 1: CRIAR O DEPLOYMENT NO GITHUB (STATUS "PENDING") --- - name: Create GitHub Deployment id: create_deployment uses: actions/github-script@v7 with: script: | - const environment = context.ref === 'refs/heads/main'? 'Production' : 'Develop'; + const ref = context.ref; + let environment; + let transient = false; + if (ref === 'refs/heads/main') { + environment = 'Production'; + } else if (ref.startsWith('refs/heads/release/')) { + environment = 'Preview'; + transient = true; + } else { + environment = 'Develop'; + transient = true; + } + const { data: deployment } = await github.rest.repos.createDeployment({ owner: context.repo.owner, repo: context.repo.repo, - ref: context.ref, + ref: context.sha, environment: environment, + transient_environment: transient, auto_merge: false, production_environment: environment === 'Production', required_contexts: [] @@ -79,7 +145,7 @@ jobs: if [ "${{ github.ref }}" == "refs/heads/main" ]; then vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} else - vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} + vercel pull --yes --token=${{ secrets.VERCEL_TOKEN }} fi - name: Build Project Artifacts @@ -94,10 +160,22 @@ jobs: - name: Deploy to Vercel and Capture URL id: deploy_step run: | + echo "VERCEL_ENV: $VERCEL_ENV" + + DEPLOY_COMMAND="" if [ "${{ github.ref }}" == "refs/heads/main" ]; then - echo "deployment_url=https://$(vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }})" >> $GITHUB_OUTPUT + DEPLOY_COMMAND="vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}" + else + DEPLOY_COMMAND="vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }}" + fi + + if DEPLOY_URL=$($DEPLOY_COMMAND); then + echo "Deployment successful." + echo "deployment_url=$DEPLOY_URL" >> $GITHUB_OUTPUT else - echo "deployment_url=https://$(vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }})" >> $GITHUB_OUTPUT + DEPLOY_STATUS=$? + echo "Error: Vercel deploy failed with exit code $DEPLOY_STATUS." + exit $DEPLOY_STATUS fi # --- FASE 3: ATUALIZAR O STATUS FINAL DO DEPLOYMENT (SUCESSO OU FALHA) --- @@ -106,7 +184,8 @@ jobs: uses: actions/github-script@v7 with: script: | - const finalState = '${{ job.status }}' === 'success'? 'success' : 'failure'; + const deployOutcome = '${{ steps.deploy_step.outcome }}'; + const finalState = (deployOutcome === 'success' && '${{ job.status }}' === 'success') ? 'success' : 'failure'; await github.rest.repos.createDeploymentStatus({ owner: context.repo.owner, repo: context.repo.repo, @@ -116,34 +195,39 @@ jobs: }); tag-release: - name: Tag Release + name: Create Git Tag needs: deploy-environment - if: github.ref == 'refs/heads/main' + # Só roda se for uma branch 'release/' E o deploy tiver sido um sucesso + if: startsWith(github.ref, 'refs/heads/release/') && needs.deploy-environment.result == 'success' runs-on: ubuntu-latest permissions: contents: write steps: - # Seu job de tag-release continua o mesmo, sem alterações - name: Checkout code uses: actions/checkout@v4 with: - fetch-depth: 0 - - name: Get version from package.json + fetch-depth: 0 # Needed to get the commit history and tags + + - name: Get version from release branch id: get_version run: | - VERSION=$(node -p "require('./package.json').version") + VERSION=$(echo "${{ github.ref }}" | sed 's|refs/heads/release/||') echo "TAG_VERSION=v$VERSION" >> $GITHUB_ENV + - name: Check if tag already exists + id: check_tag run: | + git fetch --tags if git rev-parse "refs/tags/${{ env.TAG_VERSION }}" >/dev/null 2>&1; then - echo "Tag ${{ env.TAG_VERSION }} already exists. Skipping..." - echo "SKIP_TAG=true" >> $GITHUB_ENV + echo "Tag ${{ env.TAG_VERSION }} already exists. Skipping tag creation." + echo "SKIP_TAG=true" >> $GITHUB_OUTPUT else - echo "Tag ${{ env.TAG_VERSION }} does not exist. Proceeding..." - echo "SKIP_TAG=false" >> $GITHUB_ENV + echo "Tag ${{ env.TAG_VERSION }} does not exist. Proceeding with tag creation." + echo "SKIP_TAG=false" >> $GITHUB_OUTPUT fi + - name: Create and Push Tag - if: env.SKIP_TAG == 'false' + if: steps.check_tag.outputs.SKIP_TAG == 'false' run: | git config --global user.name "github-actions[bot]" git config --global user.email "github-actions[bot]@users.noreply.github.com" diff --git a/package.json b/package.json index b09a98e..3446102 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mrdeveloper", - "version": "0.1.0", + "version": "1.0.0", "private": true, "dependencies": { "@icons-pack/react-simple-icons": "^13.8.0",