17 lines
584 B
YAML
17 lines
584 B
YAML
|
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"
|
||
|
- scp -ri ~/.ssh/staging.key -P $${PORT} . $${USER}@$${HOST}:/srv/hadeedahmad-xyz
|
||
|
secrets: [ SSH_STAGING_KEY ]
|