Hello Travis CI Community,
I am currently facing one persistent issue with the CI/CD deployment process for my website, where Travis CI reports that the build and deployment job has completed successfully, but the latest version of the website is not consistently appearing on the live site. The source code in the repository contains the most recent changes, and Travis CI is detecting the new commit and running the expected build process without reporting a failure. The build logs also indicate that the deployment stage completes successfully, but when I open the production website afterward, some pages or assets can still appear to be from the previous version. The problem is intermittent because some commits are deployed correctly while other commits appear to complete successfully without the corresponding changes becoming visible on the live website. I am trying to understand whether the problem is occurring during the Travis CI deployment process or somewhere between the generated deployment files and the final production environment.
I have already verified that the correct repository and branch are being used by the Travis CI configuration, and I can see the relevant commit being picked up when the build starts. The build itself completes successfully, including the steps that install dependencies, generate the production files, and prepare the website for deployment. When I inspect the generated output inside the Travis CI build environment, the new content is present, which confirms that the build process is using the latest source code rather than an older checkout. The difficulty begins after the deployment command runs. Travis CI reports a successful deployment, but the public website can still contain an older version of a file that was definitely changed in the latest commit. Because the generated files inside the CI environment contain the expected changes, I am trying to determine whether the correct files are actually being transferred to the production destination.
The issue can be reproduced with certain website updates, although I have not found a completely reliable pattern yet. Changes to some files become visible immediately after a successful Travis CI deployment, while changes to other files can remain absent from the live site. I have checked the repository history and confirmed that the affected files are included in the commit being built. I have also compared the generated output before deployment with the corresponding files that should exist on the production server. The Travis CI logs do not show an obvious deployment error or permission failure, and the job receives a successful exit status. Because the deployment is reported as successful even when the public site does not reflect every change, I am wondering whether the deployment command could be completing before all generated files have actually been transferred or whether a cached artifact or previous build output could be getting deployed instead of the expected current output.
I have also tried triggering a completely fresh Travis CI build rather than relying on a previous build, and the behaviour can still occur. I have checked the build directory during the job to make sure that old generated files are not being unintentionally reused, and I am considering whether the dependency cache or another Travis CI caching mechanism could be influencing the generated deployment directory. However, I do not want to disable caching permanently without knowing whether it is actually responsible. The important clue is that the build output immediately before deployment contains the correct version of the website, while the production website sometimes continues serving an older version. This makes me particularly interested in understanding what Travis CI considers a successful deployment and whether there are recommended ways to verify the exact files and commit that were transferred during a deployment.
I have also reviewed the deployment configuration and confirmed that the credentials and destination being used by Travis CI are the expected ones. The deployment process is not producing a visible error, and the website remains accessible throughout the process. I have started adding additional logging around the deployment stage so that I can record the commit hash, generated file information, and deployment timing for each build. My intention is to compare a deployment that works correctly with one that reports success but does not update the website. I would like to avoid repeatedly redeploying the same commit as a workaround because that does not explain why the first successful deployment did not make the changes available. I also want to make sure that the CI configuration is not accidentally deploying from a stale directory or skipping files that have changed between commits.
I would appreciate guidance from the Travis CI community on how to systematically troubleshoot this specific situation where a Travis CI build and deployment job reports success but the latest website files are not consistently reflected on the live site. I would particularly like to know which parts of the Travis CI build log, cache configuration, deployment configuration, or generated build directory I should inspect to determine whether the correct artifacts are being deployed. If there are recommended commands or CI configuration techniques for verifying the exact commit and files being transferred during deployment, I would be grateful for suggestions. My goal is to make the deployment process deterministic so that whenever Travis CI successfully builds and deploys a commit, the live website reliably receives that exact version without requiring repeated deployments or manual intervention. Sorry for long post!