I just configured AppVeyor Continuous Deployment.
After that, in the new project, I went to settings, https://ci.appveyor.com/project/tomap/tpi2-eu/settings, in the Build part, I choose Script and added the following:
that generates the site in the public folder.
Then I went to Artifact and selected the content of this folder:
Then I went to Deploy, choose FTP deployment. And that when issues started :(
FTP is always something messy. Active or not. FTP, SFTP or FTPS. I tried them all without success. Then start googleing and although my issue was not exactly the same, I tried the suggestion from AppVeyor Support Forum and guess what, it worked! The solution was to enable a “Beta FTP” option, … of course.
Well, at first, I wanted to use SFTP (you know, for security, …), which is supposed to be enabled on my OVH account, but it did not work. So that’s for another day.
To test the deployment, I set the FTP folder to /www/test/. Strangely, AppVeyor decided that the best folder to deploy my files was: /www/test/public/…_ instead of directly /www/test/…__ it was one folder too deep.
I googled again and found that AppVeyor documentation page that helped me. So my solution was to remove the artifact and instead use a PowerShell to publish the files so that their path was index.html instead of public/index.html.
After some trial and errors (~40 of them), I end up with something working. This is all nice and great, but I don’t like having all the configuration in AppVeyor, I prefer to have it in my Git Repository, so I can reproduce it somewhere else and I can share it also :)
Here is the exported version of my configuration: AppVeyor.yml
It takes around 2 minutes to build (due to npm package restore and FTP upload, mainly).
You can see the latest logs here: https://ci.appveyor.com/project/tomap/tpi2-eu
And the AppVeyor.yaml is pushed on my repo: https://github.com/tomap/tpi2.eu/blob/master/appveyor.yml
I also added an indispensable badge in my ReadMe:
It seems that when using appveyor.yml to store the configuration, AppVeyor uses a different virtual machine with a lower version of NodeJS. So, google again, and I found help in their support page again, and I had to add:
Which should install latest version of node (7.x) :)