# image: tetraweb/php

# before_script:
#  - npm install -g gulp-cli
#  - cd $CI_PROJECT_DIR/assets
#  - npm install
#  - gulp build
#  - rm -rf node_modules/
#  - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
#  - eval $(ssh-agent -s)
#  - mkdir -p ~/.ssh
#  - chmod 700 ~/.ssh
#  - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'

# deploy_stage:
#   only:
#     - master
#   script:
#     - ssh-add <(echo "$PRIVATE_KEY")
#     - ssh $CLIENT_ADDRESS "mkdir public_html/aidoo_tf/home/wp-content/themes/__tmp"
#     - scp -P22 -r $CI_PROJECT_DIR/* $CLIENT_ADDRESS:public_html/aidoo_tf/home/wp-content/themes/__tmp
#     - ssh $CLIENT_ADDRESS "rm -rf public_html/aidoo_tf/home/wp-content/themes/_old"
#     - ssh -p22 $CLIENT_ADDRESS "mv public_html/aidoo_tf/home/wp-content/themes/aidoo public_html/aidoo_tf/home/wp-content/themes/_old"
#     - ssh -p22 $CLIENT_ADDRESS "mv public_html/aidoo_tf/home/wp-content/themes/__tmp public_html/aidoo_tf/home/wp-content/themes/aidoo"
#     - ssh $CLIENT_ADDRESS "rm -r public_html/aidoo_tf/home4/wp-content/themes/aidoo/*"
#     - ssh $CLIENT_ADDRESS "cp -a public_html/aidoo_tf/home/wp-content/themes/aidoo/. public_html/aidoo_tf/home4/wp-content/themes/aidoo"
#     - ssh $CLIENT_ADDRESS "rm -r public_html/aidoo_tf/home5/wp-content/themes/aidoo/*"
#     - ssh $CLIENT_ADDRESS "cp -a public_html/aidoo_tf/home/wp-content/themes/aidoo/. public_html/aidoo_tf/home5/wp-content/themes/aidoo"
#     - ssh $CLIENT_ADDRESS "rm -r public_html/aidoo_tf/home6/wp-content/themes/aidoo/*"
#     - ssh $CLIENT_ADDRESS "cp -a public_html/aidoo_tf/home/wp-content/themes/aidoo/. public_html/aidoo_tf/home6/wp-content/themes/aidoo"