czernika/brocooly

View on GitHub
buddy.yml

Summary

Maintainability
Test Coverage
- pipeline: "Production Deploy"
  on: "EVENT"
  events:
  - type: "PUSH"
    refs:
    - "refs/heads/master"
  priority: "NORMAL"
  fetch_all_refs: true
  fail_on_prepare_env_warning: true
  actions:
  - action: "Upload files"
    type: "SFTP"
    input_type: "SCM_REPOSITORY"
    local_path: "/"
    remote_path: "$PROD_FTP_PATH"
    login: "$FTP_LOGIN"
    host: "$PROD_FTP_HOST"
    port: "$FTP_PORT"
    authentication_mode: "PUBLIC_KEY"
  - action: "Install composer packages and dependencies"
    type: "SSH_COMMAND"
    working_directory: "$PROD_FTP_PATH"
    login: "$FTP_LOGIN"
    host: "$PROD_FTP_HOST"
    port: "$FTP_PORT"
    authentication_mode: "PUBLIC_KEY"
    commands:
    - "php ~/bin/composer update"
    run_as_script: true
    shell: "BASH"
    trigger_conditions:
    - trigger_condition: "ON_CHANGE_AT_PATH"
      trigger_condition_paths:
      - "composer.json"
  - action: "Import database"
    type: "SSH_COMMAND"
    working_directory: "$PROD_FTP_PATH"
    login: "$FTP_LOGIN"
    host: "$PROD_FTP_HOST"
    port: "$FTP_PORT"
    authentication_mode: "PUBLIC_KEY"
    commands:
    - "wp db import databases/dumps/prod.sql"
    run_as_script: true
    shell: "BASH"
    trigger_conditions:
    - trigger_condition: "ON_CHANGE_AT_PATH"
      trigger_condition_paths:
      - "databases/dumps/prod.sql"
  trigger_conditions:
  - trigger_condition: "ALWAYS"