Issues with CI/CD pipeline integration for a React application using GitHub Actions
I'm confused about I'm working on a project and hit a roadblock. Hey everyone, I'm running into an issue that's driving me crazy. Building an application that involves a CI/CD pipeline with GitHub Actions, I've run into some trouble with the deployment process. The pipeline is supposed to trigger on push events to the main branch, but it seems to be skipping the deployment step. Here's what my `.github/workflows/deploy.yml` looks like: ```yaml name: Deploy to Production on: push: branches: - main jobs: deploy: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v2 - name: Set up Node.js uses: actions/setup-node@v2 with: node-version: '14' - name: Install dependencies run: npm install - name: Build the app run: npm run build - name: Deploy run: npm run deploy env: DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }} ``` Unfortunately, my deployment script isn't being executed. I’ve added debug statements throughout the workflow, and I can see the checkout and dependency installation steps complete successfully. However, I never see the "Deploy" step executing, and there are no error messages in the logs. In the GitHub Actions UI, the deployment step simply shows as skipped. I’ve confirmed that the `DEPLOY_TOKEN` is set up correctly in the repository settings and that the workflow is configured properly to run on push events. One thing I noticed is that other workflows are running simultaneously, which makes me wonder if there might be issues with concurrency or if there’s a setting I overlooked. I tried adding `if: github.event_name == 'push'` to the deploy step, but that didn’t change the outcome. Additionally, I’m considering whether the deployment command in `npm run deploy` could be faulty or if it somehow does not trigger properly from GitHub Actions. The command uses a separate script that handles the deployment to a cloud service, but I can’t pinpoint what might be causing the issue at this stage. Any insights on how to debug this or ensure that the deployment step executes would be greatly appreciated! Am I missing something obvious? I recently upgraded to Javascript latest. What would be the recommended way to handle this? Has anyone dealt with something similar? Am I missing something obvious? I'm coming from a different tech stack and learning Javascript. Is this even possible?