Created
September 1, 2020 22:04
-
-
Save pablodgonzalez/edc2afcd80eb5b4e49a7b3cc4c5850b2 to your computer and use it in GitHub Desktop.
Revisions
-
pablodgonzalez created this gist
Sep 1, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,22 @@ before_script: - apt-get update -y && apt-get install openssh-client rsync -y - mkdir -p ~/.ssh - chmod 700 ~/.ssh - echo 'echo "$SSH_PASSPHRASE"' > ~/.ssh/.print_ssh_password - chmod 700 ~/.ssh/.print_ssh_password - chmod +x ~/.ssh/.print_ssh_password - echo "$SSH_KNOWN_HOSTS" >> ~/.ssh/known_hosts - chmod 644 ~/.ssh/known_hosts - eval $(ssh-agent -s) - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | DISPLAY=":0.0" SSH_ASKPASS=~/.ssh/.print_ssh_password setsid ssh-add - > /dev/null deploy_staging: type: deploy script: - rsync -rzvhWP --delete --delete-excluded --exclude-from 'exclude-files.txt' ./public/ user@host.net:~/public/ - echo "Staging Ready!" environment: name: staging url: http://www.host.net only: - development