Create a GitHub Actions workflow to automate the build process for a React application. The workflow should trigger on pushes to the main branch and pull requests targeting the main branch. It should set up the Node.js environment, install dependencies, build the React application, and archive the build artifacts. This workflow will streamline the continuous integration process, ensuring that the React application is built consistently and ready for deployment.
Create a GitHub Actions workflow to automate the build process for a React application. The workflow should trigger on pushes to the main branch and pull requests targeting the main branch. It should set up the Node.js environment, install dependencies, build the React application, and archive the build artifacts. This workflow will streamline the continuous integration process, ensuring that the React application is built consistently and ready for deployment.