python-mapswipe-workers
python-mapswipe-workers copied to clipboard
deploy to dev server in ci workflow
We used to deploy to the dev server once the Travis CI build was successful. When moving from Travis to Github Actions we did not implement this right away.
We should check how we can get it to work in Github Actions.
this is how we did it in Travis:
after_success:
# SSH setup to deploy to server after build.
- apk add openssh-client
- eval "$(ssh-agent -s)" # start the ssh agent
- mkdir -p $HOME/.ssh
# Use config to define SSH connection variables (User, IdentityFile)
- cp travis/ssh_config $HOME/.ssh/config
- openssl aes-256-cbc -K $encrypted_c17fa81e6490_key -iv $encrypted_c17fa81e6490_iv -in travis/ssh-private-key.enc -out $HOME/.ssh/private-key -d
- chmod 600 $HOME/.ssh/private-key
- ssh-add $HOME/.ssh/private-key
- chmod +x deploy.sh
deploy:
# Deploy to server using Ansible
provider: script
script: bash deploy.sh
on:
branch: dev