From 1f668451a9934386fb47d4ce79b147292470216c Mon Sep 17 00:00:00 2001 From: Aditya Thakral Date: Mon, 23 Aug 2021 12:09:27 -0400 Subject: [PATCH 1/3] Add auto deploys for staging --- .drone.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.drone.yml b/.drone.yml index a5becb8b..a3a0926e 100644 --- a/.drone.yml +++ b/.drone.yml @@ -30,6 +30,16 @@ steps: commands: - npm run export +- name: deploy (staging) + image: node:16 + depends_on: + - export + environment: + TOKEN: + from_secret: STAGING_TOKEN + commands: + - curl -XPOST -H "Authorization: $TOKEN" "https://csclub.uwaterloo.ca/~a3thakra/update-csc/" + trigger: event: exclude: -- 2.39.2 From 09aa6eba344b01dba1e00fb9157a87728b3e3347 Mon Sep 17 00:00:00 2001 From: Aditya Thakral Date: Mon, 23 Aug 2021 12:11:24 -0400 Subject: [PATCH 2/3] Fix formatting issue --- .drone.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index a3a0926e..a99ec569 100644 --- a/.drone.yml +++ b/.drone.yml @@ -38,7 +38,10 @@ steps: TOKEN: from_secret: STAGING_TOKEN commands: - - curl -XPOST -H "Authorization: $TOKEN" "https://csclub.uwaterloo.ca/~a3thakra/update-csc/" + - 'curl -XPOST -H "Authorization: $TOKEN" "https://csclub.uwaterloo.ca/~a3thakra/update-csc/"' + # when: + # branch: + # - main trigger: event: -- 2.39.2 From 82619d45088a1d0182b08adfa2762628bbbba642 Mon Sep 17 00:00:00 2001 From: Aditya Thakral Date: Mon, 23 Aug 2021 12:35:52 -0400 Subject: [PATCH 3/3] Only run on the main branch --- .drone.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index a99ec569..beafe344 100644 --- a/.drone.yml +++ b/.drone.yml @@ -39,9 +39,9 @@ steps: from_secret: STAGING_TOKEN commands: - 'curl -XPOST -H "Authorization: $TOKEN" "https://csclub.uwaterloo.ca/~a3thakra/update-csc/"' - # when: - # branch: - # - main + when: + branch: + - main trigger: event: -- 2.39.2