add deployment step (#310)

Closes #131.

Reviewed-on: www/www-new#310
Co-authored-by: Max Erenberg <merenber@csclub.uwaterloo.ca>
Co-committed-by: Max Erenberg <merenber@csclub.uwaterloo.ca>
fix-md-font
Max Erenberg 1 year ago
parent b46c8d3d5a
commit a21e8f2f0c
  1. 20
      .drone.yml

@ -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

Loading…
Cancel
Save