<p>I don't think you are missing any easy solutions because</p>
<ol>
<li>the easy solutions probably rely on you having full access to the webserver -- which you don't have? The challenge is what is the best you can do given limited server access.</li>
<li>FTP does not have a reliable, built-in way to only upload changed files.</li>
</ol>
<p>I think:</p>
<ul>
<li><p>your only solution for problem 1 is to write your own shell script</p>
</li>
<li><p>problem 2 is usefully discussed here: <a href="https://stackoverflow.com/questions/424680/trying-to-find-a-simple-way-to-do-upload-only-modified-files-through-ftp">https://stackoverflow.com/questions/424680/trying-to-find-a-simple-way-to-do-upload-only-modified-files-through-ftp</a> .</p>
</li>
</ul>
<p>The viable solutions both amount to 'save hashes of the files on the server, then compare before upload'. However if you can get your pipeline to install and use <code>git-ftp</code> then <code>git-ftp</code> will do all that for you.</p>

CC BY-SA 4.0
2021-02-05T23:13:00.457Z
2021-02-05T23:13:00.457Z
Chris F Carroll
<p><strong>Scenario:</strong></p>
<p>I'm using the Ruby/Jekyll build process to generate a static website from markdown etc files via a templating process -- the same flow as the one used by Github Pages but instead of hosting it on Github I want to be able to upload it to my (existing) shared hosting provider and serve the files from there. (I already have DNS and everything in place with the web host.)</p>
<p>The hosting provider offers FTP and SSH via cPanel but no direct hook in to Git.</p>
<p>The build process (which I am doing manually for now, but will eventually become an automated build process and no doubt generate more questions!) creates/updates the static files in a '_site' directory within my repo.</p>
<p>My local &quot;CI&quot; build (on my own pc) uses a development branch and then when happy with the changes I push them up into master.</p>
<p><strong>Where I'm stuck:</strong></p>
<p>I want to be able to use an Azure Devops release pipeline to get the files into my web host, triggered by a merge into master.</p>
<p>I have had this running successfully (triggered manually, but I don't think the trigger part is a problem) using an inbuilt FTP task to grab the contents of the '_site' directory as an artifact and FTP them up to the web host.</p>
<p>However the FTP task (and the artifact) isn't very 'smart', in that it will re-upload everything every time I want to deploy even if only a few files have changed. This obviously takes longer and eats into my (metered) bandwidth for uploading (and seems like it is not good DevOps!)</p>
<p>Most often, only a small subset of files are actually changed by the build. This is usually where a new page is created or a stylesheet changed for example. Occasionally, all files are actually changed, such as if an &quot;included&quot; component changes so that all the static pages have to be re-rendered.</p>
<p><strong>What I'm looking for</strong> is an approach or workflow to just upload the changed (and new) files, rather than all the files. It sounds like it ought to be easy, so perhaps I am missing something.</p>

<git><azure-devops><continuous-deployment><jekyll>
Azure Devops - workflow/strategy for uploading only changed files to shared hosting provider after a build of static website (Jekyll)
seventyeightist
# Azure Devops - workflow/strategy for uploading only changed files to shared hosting provider after a build of static website (Jekyll)

(Asked by: username_0 on 2021-02-05)

**Scenario:**

I'm using the Ruby/Jekyll build process to generate a static website from markdown etc files via a templating process -- the same flow as the one used by Github Pages but instead of hosting it on Github I want to be able to upload it to my (existing) shared hosting provider and serve the files from there. (I already have DNS and everything in place with the web host.)

The hosting provider offers FTP and SSH via cPanel but no direct hook in to Git.

The build process (which I am doing manually for now, but will eventually become an automated build process and no doubt generate more questions!) creates/updates the static files in a '\_site' directory within my repo.

My local "CI" build (on my own pc) uses a development branch and then when happy with the changes I push them up into master.

**Where I'm stuck:**

I want to be able to use an Azure Devops release pipeline to get the files into my web host, triggered by a merge into master.

I have had this running successfully (triggered manually, but I don't think the trigger part is a problem) using an inbuilt FTP task to grab the contents of the '\_site' directory as an artifact and FTP them up to the web host.

However the FTP task (and the artifact) isn't very 'smart', in that it will re-upload everything every time I want to deploy even if only a few files have changed. This obviously takes longer and eats into my (metered) bandwidth for uploading (and seems like it is not good DevOps!)

Most often, only a small subset of files are actually changed by the build. This is usually where a new page is created or a stylesheet changed for example. Occasionally, all files are actually changed, such as if an "included" component changes so that all the static pages have to be re-rendered.

**What I'm looking for** is an approach or workflow to just upload the changed (and new) files, rather than all the files. It sounds like it ought to be easy, so perhaps I am missing something.

**Tags:** git, azure-devops, continuous-deployment, jekyll


---

## 1 answers

### Answer by username_1 on 2021-02-05. Score: 2 | Accepted answer

I don't think you are missing any easy solutions because

1. the easy solutions probably rely on you having full access to the webserver -- which you don't have? The challenge is what is the best you can do given limited server access.
2. FTP does not have a reliable, built-in way to only upload changed files.

I think:

* your only solution for problem 1 is to write your own shell script
* problem 2 is usefully discussed here: <https://stackoverflow.com/questions/424680/trying-to-find-a-simple-way-to-do-upload-only-modified-files-through-ftp> .

The viable solutions both amount to 'save hashes of the files on the server, then compare before upload'. However if you can get your pipeline to install and use `git-ftp` then `git-ftp` will do all that for you.


---

