Setup deploy on main
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Shahan Nedadahandeh 2022-12-30 20:12:41 -05:00
parent a23268946b
commit a0608fc453
1 changed files with 17 additions and 2 deletions

View File

@ -50,7 +50,7 @@ steps:
registry: registry.cloud.csclub.uwaterloo.ca
repo: registry.cloud.csclub.uwaterloo.ca/snedadah/csc-class-profile-staging
- name: deploy
- name: deploy (staging)
image: node:16
depends_on:
- publish
@ -60,7 +60,22 @@ steps:
commands:
- echo "The docker build tag is ${DRONE_BRANCH//\//-}"
- 'curl -H "Authorization: $STAGING_AUTH_TOKEN" https://csclub.uwaterloo.ca/~snedadah/webhooks/cscclassprofilestaging?ref=${DRONE_BRANCH//\//-}'
- name: deploy (production)
image: node:16
depends_on:
- export
environment:
SSH_KEY:
from_secret: DEPLOYMENT_SSH_KEY
commands:
- 'echo "$SSH_KEY" > /tmp/ssh_key'
- chmod 600 /tmp/ssh_key
- ssh -4 -i /tmp/ssh_key www@caffeine.csclub.uwaterloo.ca -o StrictHostKeyChecking=no '~/bin/classprofile/deploy-classprofile-2022.sh'
when:
branch:
- main
trigger:
event:
exclude: