1
Fork 0

Add conditions

This commit is contained in:
Hadeed 2024-04-24 06:58:49 +05:00
parent d1966ed564
commit 0e05560cb3

View file

@ -12,5 +12,8 @@ steps:
- echo "$SSH_STAGING_KEY" > ~/.ssh/staging.key - echo "$SSH_STAGING_KEY" > ~/.ssh/staging.key
- chmod 600 ~/.ssh/staging.key - chmod 600 ~/.ssh/staging.key
- ssh -i ~/.ssh/staging.key -p $${PORT} $${USER}@$${HOST} "rm -rf /srv/hadeedahmad-xyz" - 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 - scp -ri ~/.ssh/staging.key -P $${PORT} * $${USER}@$${HOST}:/srv/hadeedahmad-xyz
secrets: [ SSH_STAGING_KEY ] secrets: [ SSH_STAGING_KEY ]
when:
- event: push
branch: main