I'm currently trying to set up a documentation project on Travis CI. The build script uses the mkdocs library to generate markdown files to HTML files. I've tried now many hours to automate the deploy process with Travis CI. It should generate the files directly on Travis CI and upload it then to an FTP server.
What I've tried
So I had committed this .travis.yml file to my Github repo.
language: python
python:
- "2.7"
env:
global:
#FTP_USERNAME
- secure: "N9knL6LsuiZ....."
#FTP_PASSWORD
- secure: "NrRpwCeay7Y0s....."
install:
- pip install mkdocs
- mkdocs --version
script:
- mkdocs build
after_success:
- find documentation -type f -exec curl -u "${FTP_USERNAME}:${FTP_PASSWORD}" --verbose --progress-bar --ftp-create-dirs --max-time 30 -T {} ftp://my.ftp-server.com/{} \;
The mkdocs build script does output the generated files in the root folder "documentation". Actually this code works unless the directory on the FTP server does not exist.
What does not work
I have tried the same code locally (just ran the after_success command) and there it uploads the files correctly with content. When Travis-CI now starts uploading the files to my FTP server, then it begins with the transfer but does not end it until the timeout exception will be thrown. When I check the files on the server, then it only has created empty files.
Can maybe someone help me why this problem occurs?