add deployment step (#310)
continuous-integration/drone/push Build is failing Details

Closes #131.

Reviewed-on: #310
Co-authored-by: Max Erenberg <merenber@csclub.uwaterloo.ca>
Co-committed-by: Max Erenberg <merenber@csclub.uwaterloo.ca>
This commit is contained in:
Max Erenberg 2021-09-11 15:24:19 -04:00
parent b46c8d3d5a
commit a21e8f2f0c
1 changed files with 19 additions and 1 deletions

View File

@ -46,8 +46,26 @@ steps:
from_secret: STAGING_TOKEN
commands:
- 'curl -XPOST -H "Authorization: $TOKEN" -H "X-Branch: $DRONE_BRANCH" "https://csclub.uwaterloo.ca/~a3thakra/update-csc/"'
when:
branch:
exclude:
- main
- name: deploy (production)
image: node:16
depends_on:
- export
environment:
SSH_KEY:
from_secret: DEPLOYMENT_SSH_KEY
commands:
- 'echo "$SSH_KEY" > /tmp/ssh_key'
- ssh -i /tmp/ssh_key www@caffeine.csclub.uwaterloo.ca '~/bin/deploy-website.sh'
when:
branch:
- main
trigger:
event:
exclude:
- pull_request #avoid double build on PRs
- pull_request #avoid double build on PRs