I had auto deployments connected to my bitbucket repo for master, uat and development branches working. However I want to do static code analysis and an npm audit as part of my build. I have configured a CI pipeline that will automatically build my site and do my analysis as required. As part of my pipeline I am using the netlify cli to deploy the statically rendered site. I have turned off Netlify auto deploys as I wish to deploy only from my ci pipeline, in doing so I noticed that visiting the branch deploy url doesn’t render the same site as visiting the deploy preview site. The deploy preview site is correct but the branch deploy url does not update to the latest deployed version. The attached screen shot shows the successful deploy and links in question (I have marked up in red text).
The netlify cli command I am using as part of my ci pipeline is as follows
netlify deploy --dir ./dist/static --auth $NETLIFY_LOGIN --site $NETLIFY_SITE -b uat --message "Deploy UAT branch"
As you can see I’m providing the branch name with the -b flag and the branch deploy url is https://uat–…netlify.ap where … is the site name.
Please note I am using linux env variables in the command for the secrets.
I have also pulled down the zip file for the deploy in question to confirm that the site was deployed correctly and the zip file contains the desired changes.
Does anyone know why the 2 links from the same deploy serve different content?