fixes few missed details #145
Workflow file for this run
This file contains 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 characters
name: ci | |
on: [push, pull_request] | |
jobs: | |
deploy-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: check out repository | |
uses: actions/checkout@v2 | |
- name: Get current date | |
id: date | |
run: echo "::set-output name=date::$(date +'%Y-%m-%d')" | |
- name: Set up SSH key | |
uses: webfactory/ssh-agent@v0.5.3 | |
with: | |
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | |
- name: Add host key to known_hosts | |
run: ssh-keyscan -H usegalaxy-test.cerit-sc.cz >> ~/.ssh/known_hosts | |
- name: Install rsync | |
run: sudo apt-get update && sudo apt-get install -y rsync | |
- name: Copy files to test instance and preserve secrets and hosts | |
run: | | |
rsync -rav * debian@usegalaxy-test.cerit-sc.cz:~/usegalaxy-${{ steps.date.outputs.date }} | |
ssh debian@usegalaxy-test.cerit-sc.cz 'cp ~/usegalaxy/group_vars/secret.yml ~/usegalaxy-${{ steps.date.outputs.date }}/group_vars' | |
ssh debian@usegalaxy-test.cerit-sc.cz 'cp ~/usegalaxy/hosts ~/usegalaxy-${{ steps.date.outputs.date }}' | |
ssh debian@usegalaxy-test.cerit-sc.cz 'cp ~/usegalaxy/.vault-password.txt ~/usegalaxy-${{ steps.date.outputs.date }}' | |
- name: Run playbook | |
run: | | |
# don't use "--force" here, some changes in roles were done manually and will be overwritten, see README.md | |
ssh debian@usegalaxy-test.cerit-sc.cz 'cd ~/usegalaxy-${{ steps.date.outputs.date }} && ansible-galaxy install -p roles -r requirements.yml' | |
ssh debian@usegalaxy-test.cerit-sc.cz 'cd ~/usegalaxy-${{ steps.date.outputs.date }} && ansible-playbook galaxy.yml' |