Search code examples
netlify

How to change a Netlify file after Build


Is it possible to change a file on Netlify after the site has already been built?

Example:

If I have a site: https://physiome-test.netlify.com/simple_heart/ that accesses a file at

https://physiome-test.netlify.com/simple_heart/models/organsViewerModels/cardiovascular/heart/ecgAnimation.json

Is there any way that I can change this file without having to update my github repository?


Solution

  • Is there any way that I can change this file without having to update my github repository?

    Using Netlify continuous deployment, which is what you are doing, you can't just change one file on Netlify without changing the files in your git repository that is tied to building your build process.

    Process Netlify uses:

    • On commit trigger (webhook from GitHub) or a trigger deploy in the app.netlify.com admin
    • Checkout your target branch
    • Runs your build command
    • Compares your current build to existing CDN contents
    • Updates global CDN for changed files in your target deploy location

    Changing Netlify Files without changing git

    A new feature allows you to drag a deploy folder to app.netlify.com for fast review/deploy without using your git repository. Go to the Deploys tab of the site you want to update. You will see a message at the bottom like the pic below:

    enter image description here

    Drag your deploy folder to this location from your local system and your site will be updated with any new files on Netlify.

    Note: All the files of your site must be in the folder with your current changes.