tell us what's happening in the woodpecker UI
All checks were successful
ci/woodpecker/push/build-and-deploy Pipeline was successful
All checks were successful
ci/woodpecker/push/build-and-deploy Pipeline was successful
This commit is contained in:
parent
534864fd10
commit
9b958a1fc9
3 changed files with 18 additions and 9 deletions
|
@ -18,7 +18,14 @@ steps:
|
|||
secrets:
|
||||
- deploy_ssh_key
|
||||
commands:
|
||||
- ./.woodpecker/ssh.sh
|
||||
- echo "SETTING UP SSH"
|
||||
- apk add openssh-client
|
||||
- mkdir -p $HOME/.ssh
|
||||
- ssh-keyscan -t ed25519 turtle.hup.is >> $HOME/.ssh/known_hosts
|
||||
- echo "$DEPLOY_SSH_KEY" > $HOME/.ssh/id_ed25519
|
||||
- chmod 0600 $HOME/.ssh/id_ed25519
|
||||
- echo "SSH SETUP DONE"
|
||||
- echo "RUNNING DEPLOY SCRIPT"
|
||||
- ./.woodpecker/deploy.sh
|
||||
when:
|
||||
# Only try to deploy if previous step is successful
|
||||
|
|
|
@ -4,20 +4,29 @@
|
|||
host=deploy@turtle.hup.is
|
||||
|
||||
# organize the files
|
||||
echo "ORGANIZING THE FILES NICELY"
|
||||
mkdir oxaliq
|
||||
mv dist oxaliq/.
|
||||
mv source oxaliq/.
|
||||
mv static oxaliq/.
|
||||
|
||||
# put them on the deployment target
|
||||
echo "COPYING FILES TO DEPLOYMENT TARGET"
|
||||
scp -r oxaliq "$host":~/
|
||||
|
||||
# do everything on the server that's necessary to run the new thing
|
||||
# TODO make this not remove the old-working version until
|
||||
# the new version is confirmed working
|
||||
ssh $host 'echo "does this ls show up in UI?" && ls -la'
|
||||
echo "SETTING OWNERSHIP AND PERMISSIONS"
|
||||
ssh $host 'sudo chown -R sorreldotdev:sorreldotdev oxaliq/'
|
||||
ssh $host 'sudo chmod -R 755 oxaliq/'
|
||||
|
||||
echo "REPLACING PREVIOUS DEPLOYMENT"
|
||||
ssh $host 'sudo rm -rf /srv/oxaliq || true'
|
||||
ssh $host 'sudo mv oxaliq /srv/.'
|
||||
|
||||
echo "RESTARTING SERVICE"
|
||||
ssh $host 'sudo systemctl restart sorreldotdev.service'
|
||||
|
||||
echo "SUCCESS!"
|
||||
exit 0
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
apk add openssh-client
|
||||
mkdir -p $HOME/.ssh
|
||||
ssh-keyscan -t ed25519 turtle.hup.is >> $HOME/.ssh/known_hosts
|
||||
echo "$DEPLOY_SSH_KEY" > $HOME/.ssh/id_ed25519
|
||||
chmod 0600 $HOME/.ssh/id_ed25519
|
Loading…
Reference in a new issue