add deployment step #310

Merged
merenber merged 2 commits from merenber-ssh-deploy into main 2021-09-11 15:24:21 -04:00
Owner

Closes #131.

Closes #131.
merenber added 1 commit 2021-09-08 23:12:19 -04:00
continuous-integration/drone/push Build is passing Details
f7431a05f0
add deployment step
merenber requested review from a3thakra 2021-09-08 23:12:37 -04:00
merenber requested review from n3parikh 2021-09-08 23:12:50 -04:00
a3thakra reviewed 2021-09-09 00:20:36 -04:00
@ -50,0 +56,4 @@
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'
Owner

Can we somehow use the /deploy.sh script placed in this repository, just so that everything is in a single place?

Can we somehow use the /deploy.sh script placed in this repository, just so that everything is in a single place?
Owner

if not this is also fine :)

if not this is also fine :)
Author
Owner

The contents of deploy-website.sh are just

#!/bin/sh
curl -o- https://git.csclub.uwaterloo.ca/www/www-new/raw/branch/main/deploy.sh | bash
The contents of deploy-website.sh are just ```sh #!/bin/sh curl -o- https://git.csclub.uwaterloo.ca/www/www-new/raw/branch/main/deploy.sh | bash ```
Owner

if the contents of the file is a single line, why not inline that command here?

if the contents of the file is a single line, why not inline that command here?
Author
Owner

It's because we have a command clause in the authorized_keys file for the www user.

It's because we have a `command` clause in the authorized_keys file for the www user.
a3thakra reviewed 2021-09-09 00:21:21 -04:00
@ -47,7 +47,21 @@ steps:
commands:
- 'curl -XPOST -H "Authorization: $TOKEN" -H "X-Branch: $DRONE_BRANCH" "https://csclub.uwaterloo.ca/~a3thakra/update-csc/"'
Owner

Can you add a condition here so it doesn't run on the main branch?

Can you add a condition here so it doesn't run on the main branch?
Owner

Sidenote: can we get https://staging.csclub.uwaterloo.ca to deploy branches in a similar fashion?

Sidenote: can we get https://staging.csclub.uwaterloo.ca to deploy branches in a similar fashion?
merenber added 1 commit 2021-09-09 00:53:29 -04:00
continuous-integration/drone/push Build is passing Details
d752d51f9f
exclude main branch from staging
Author
Owner

Sidenote: can we get https://staging.csclub.uwaterloo.ca to deploy branches in a similar fashion?

I suggest using the progcom VM for this, since it is sitting unused right now.

> Sidenote: can we get https://staging.csclub.uwaterloo.ca to deploy branches in a similar fashion? I suggest using the progcom VM for this, since it is sitting unused right now.
Author
Owner

Unless there are any objections, I'm going to merge this one in.

Unless there are any objections, I'm going to merge this one in.
merenber merged commit a21e8f2f0c into main 2021-09-11 15:24:21 -04:00
merenber referenced this issue from a commit 2021-09-11 15:24:22 -04:00
merenber deleted branch merenber-ssh-deploy 2021-09-11 15:24:30 -04:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: www/www-new#310
No description provided.