# This is a sample build configuration for JavaScript.
# Check our guides at https://confluence.atlassian.com/x/14UWN for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
# https://support.atlassian.com/bitbucket-cloud/docs/laravel-with-bitbucket-pipelines/
image: node:13.6-stretch

pipelines:
  branches:
    develop:
      - step:
          name: Build
          caches:
            - node
          script:
            - npm install
            - npm run build --develop
          artifacts:
            - dist/**
      - step:
          name: Publish
          script:
            - pipe: atlassian/scp-deploy:0.3.3
              variables:
                USER: 'root'
                SERVER: '143.198.73.144'
                REMOTE_PATH: '/var/www/html/principe_azul/vue_principe'
                LOCAL_PATH: '/var/www/html/principe_azul/vue_principe/dist/*'
