"netlify deploy --prod" doesn't show site with latest changes (VueJS)

I am using VueJS 2.x to deploy my site to netlify. My current deploy is https://jesalgandhi.com, and was deployed using the “netlify deploy --prod” command to use the token-hider netlify function. This build succeeded but did not update the site with the latest files in my directory.

I know this because I changed a file (resume.pdf) on my local directory, pushed the change to github, and re-ran “netlify deploy --prod”, and this change is not reflected on the site. My netlify build states that “All files already uploaded by a previous deploy with the same commits.” My github page shows the newer version of the resume in the directory (personal-website/resume.pdf at main · jesalgandhi/personal-website · GitHub), while this netlify build shows my older version of the resume (see it by clicking “My Resume” on the website).

The deploy log and build settings are below:

2:38:48 AM: Creating deploy upload records
2:38:48 AM: Starting post processing
2:38:48 AM: Post processing - HTML
2:38:48 AM: Post processing - header rules
2:38:48 AM: Post processing - redirect rules
2:38:49 AM: Post processing done
2:38:49 AM: Site is live ✨

image

I’m confused.

You say you pushed the changes to GitHub and your screenshot shows that the site is connected to a Git repo.

But then you’re using CLI to deploy the site as per this command and the excerpt from the logs.

So, which way are you following exactly?

I pushed the change to GitHub, but after doing so, I ran “netlify deploy --prod”. So, the current version of my site is being deployed from the netlify CLI, not the GitHub repository. The build settings shows the GitHub repository, but that version is not currently being deployed. My issue is that my files are not updated on my site whenever I deploy through the netlify CLI.

Did you run netlify deploy --prod --build? When you don’t pass the --build flag, CLI just deploys the publish directory (possibly from the previous build) without building a fresh copy.

1 Like

That seems to have worked for me. Thanks for the help!

1 Like