GitHub Actions not pulling latest changes from main branch during deployment despite correct checkout
I'm writing unit tests and I'm running into an issue with my GitHub Actions workflow where it seems to be deploying an older version of my application. My workflow is set up to trigger on pushes to the `main` branch, but when I check the deployed version, it doesn't reflect the latest changes. I've confirmed that my `main` branch is up to date with the latest commits, but it appears that the action is using a cached version or not pulling the latest changes for some reason. Hereโs a snippet of my workflow file: ```yaml name: Deploy to Production on: push: branches: - main jobs: deploy: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v2 with: fetch-depth: 0 - name: Build run: npm install && npm run build - name: Deploy run: ./deploy.sh ``` I have also tried changing the `fetch-depth` parameter to `0` to ensure I'm fetching all history, as I read that might help avoid issues with shallow clones. Despite this, I still notice that the code being deployed is not the latest. Additionally, Iโve checked the logs of the action, and everything seems to indicate that the checkout step was successful, but the deployed application doesnโt reflect my latest commits. Could this be a caching issue with the deployment server? Has anyone else experienced this, and what could be potential solutions or workarounds? Iโm using Node.js version 16 and my deployment script is fairly straightforward. Any insights would be greatly appreciated! I'm working in a Linux environment. Any advice would be much appreciated. I'd be grateful for any help.