2024-04-24 01:36:32 +00:00
|
|
|
steps:
|
|
|
|
deploy:
|
|
|
|
image: kroniak/ssh-client
|
|
|
|
environment:
|
|
|
|
- USER=linuxserver.io
|
|
|
|
- HOST=hadeedahmad.xyz
|
|
|
|
- PORT=33262
|
|
|
|
commands:
|
|
|
|
- mkdir -p ~/.ssh
|
|
|
|
- chmod 700 ~/.ssh
|
|
|
|
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
|
|
|
|
- echo "$SSH_STAGING_KEY" > ~/.ssh/staging.key
|
|
|
|
- chmod 600 ~/.ssh/staging.key
|
|
|
|
- ssh -i ~/.ssh/staging.key -p $${PORT} $${USER}@$${HOST} "rm -rf /srv/hadeedahmad-xyz"
|
2024-04-24 01:58:49 +00:00
|
|
|
- scp -ri ~/.ssh/staging.key -P $${PORT} * $${USER}@$${HOST}:/srv/hadeedahmad-xyz
|
2024-04-24 01:36:32 +00:00
|
|
|
secrets: [ SSH_STAGING_KEY ]
|
2024-04-24 01:58:49 +00:00
|
|
|
when:
|
|
|
|
- event: push
|
|
|
|
branch: main
|