M
M
mirexdoors2020-02-04 08:50:33
Node.js
mirexdoors, 2020-02-04 08:50:33

How to properly deploy a node.js application to ftp using bitbucket pipelines?

Hello! To deploy a node.js application, I try to use the following config:

image: node:6.9.4
  branches: # Pipelines that run automatically on a commit to a branch
    master:
     - step:
        caches:
          - node
        script:
          - apt-get update
          - apt-get -qq install git-ftp
          - apt-get install -y ssh
          - git ftp push --user $FTP_LOGIN --passwd $FTP_PASSWORD ftp://$FTP_HOST/public_html/
          - ssh [email protected] ./deploy.sh


In deploy.sh:
#!/usr/bin/env bash
npm install


But it doesn't work. Please tell me the right way

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question