maren/add-ci #2

Closed
stillgreenmoss wants to merge 21 commits from maren/add-ci into main
Showing only changes of commit 3ced7b2bfc - Show all commits

View file

@ -16,16 +16,17 @@ steps:
image: alpine:latest image: alpine:latest
secrets: [ deploy_ssh_key ] secrets: [ deploy_ssh_key ]
commands: commands:
- ls
- apk add openssh - apk add openssh
- mkdir ~/.ssh - mkdir ~/.ssh
- printf '%s\n' "$${DEPLOY_SSH_KEY}" > ~/.ssh/deploy_ssh_key - printf '%s\n' "$${DEPLOY_SSH_KEY}" > ~/.ssh/deploy_ssh_key
- printf "Host turtle.hup.is\n\tIdentityFile ~/.ssh/deploy_ssh_key\n\tUserKnownHostsFile=/dev/null\n\tStrictHostKeyChecking=no\n" > ~/.ssh/config - printf "Host turtle.hup.is\n\tIdentityFile ~/.ssh/deploy_ssh_key\n\tUserKnownHostsFile=/dev/null\n\tStrictHostKeyChecking=no\n" > ~/.ssh/config
- chmod -R u=rwX,go= ~/.ssh - chmod -R u=rwX,go= ~/.ssh
# - rsync -rPvce ssh --chmod=ugo=rwX --no-times public/ www-fediparty@fediverse.party:www/ - mkdir oxaliq
- scp -r dist deploy@turtle.hup.is:~/ - mv dist oxaliq/.
- scp -r source deploy@turtle.hup.is:~/ - mv source oxaliq/.
- scp -r static deploy@turtle.hup.is:~/ - mv static oxaliq/.
- scp -r oxaliq deploy@turtle.hup.is:~/
- ssh deploy@turtle.hup.is 'sudo rm /srv/oxaliq || true && sudo mv oxaliq /srv/. && sudo systemctl restart sorreldotdev.service'
when: when:
# Only try to deploy if previous step is successful # Only try to deploy if previous step is successful
status: success status: success