Search code examples
node.jsnpmdeploymentdevopstravis-ci

Travis do not upload files using lftp


This is my configuration:

language: node_js
node_js:
  - '12'

cache: npm

script:
  - npm test
  - npm run build

after_success:
  - sudo apt-get -y install lftp
  - echo "set dns:order \"inet inet6\"" > ~/.lftprc
  - lftp -e "mirror -eR ./app ~/tmp" -u ${USERNAME}:${PASSWORD} ftp://${FTP_SERVER}

And everything works fine. Except the last command. When I'm trying to upload files to the server using this command it takes 1-2 minutes, but travis cannot do it at all. It says that time is out and raises an error. Even if I increase timeout to 30 minutes nothing really changes.

I want to test, build and then deploy my site to the server using FTP protocol. And as I've already said I can do it from my machine using lftp.

How can I fix it?


Solution

  • I really tried to find the answer, but there's nothing. But istead I had found the solution - Github Actions. It works much better, then Travis.