1
Fork 0
personal_website/.woodpecker.yaml
2024-04-24 06:45:58 +05:00

16 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 ]