From 7fbc195a64300b1434f1cb728217721bba2cf8d6 Mon Sep 17 00:00:00 2001 From: ktyl Date: Wed, 28 Sep 2022 01:24:45 +0100 Subject: [PATCH 1/2] restrict deploy step to main branch --- .drone.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.drone.yml b/.drone.yml index 301ae35..5f2bdde 100644 --- a/.drone.yml +++ b/.drone.yml @@ -32,10 +32,6 @@ steps: SSH_KEY: from_secret: ssh_key - when: - branch: - - main - commands: # install deps - apt-get update -qq > /dev/null @@ -68,4 +64,6 @@ steps: - rsync -rP site/* "$host:$${HOST}" - ssh $host $delete_current_files - ssh $host $deploy_new_files - + when: + branch: + - main -- 2.34.1 From 9fc5be60efb0ee3b6c05088b5c57964432d9e1ed Mon Sep 17 00:00:00 2001 From: ktyl Date: Wed, 28 Sep 2022 01:30:25 +0100 Subject: [PATCH 2/2] don't deploy on pull requests --- .drone.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 5f2bdde..d17ad74 100644 --- a/.drone.yml +++ b/.drone.yml @@ -31,7 +31,6 @@ steps: from_secret: user SSH_KEY: from_secret: ssh_key - commands: # install deps - apt-get update -qq > /dev/null @@ -67,3 +66,6 @@ steps: when: branch: - main + event: + exclude: + - pull_request -- 2.34.1