1
Fork 0
personal_website/.woodpecker.yaml

17 lines
584 B
YAML
Raw Normal View History

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