restrict deploy step to main branch

This commit is contained in:
ktyl 2022-09-28 01:24:45 +01:00
parent 4c714adfdd
commit 9493cf5a73
1 changed files with 3 additions and 5 deletions

View File

@ -32,10 +32,6 @@ steps:
SSH_KEY: SSH_KEY:
from_secret: ssh_key from_secret: ssh_key
when:
branch:
- main
commands: commands:
# install deps # install deps
- apt-get update -qq > /dev/null - apt-get update -qq > /dev/null
@ -68,4 +64,6 @@ steps:
- rsync -rP site/* "$host:$${HOST}" - rsync -rP site/* "$host:$${HOST}"
- ssh $host $delete_current_files - ssh $host $delete_current_files
- ssh $host $deploy_new_files - ssh $host $deploy_new_files
when:
branch:
- main