add deployment step #310

Merged
merenber merged 2 commits from merenber-ssh-deploy into main 1 year ago
Owner

Closes #131.

Closes #131.
merenber added 1 commit 1 year ago
f7431a05f0 add deployment step
merenber requested review from a3thakra 1 year ago
merenber requested review from n3parikh 1 year ago
a3thakra reviewed 1 year ago
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'
Collaborator

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?
Collaborator

if not this is also fine :)

if not this is also fine :)
Poster
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 ```
Collaborator

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?
Poster
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 1 year ago
commands:
- 'curl -XPOST -H "Authorization: $TOKEN" -H "X-Branch: $DRONE_BRANCH" "https://csclub.uwaterloo.ca/~a3thakra/update-csc/"'
Collaborator

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?
Collaborator

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 1 year ago
d752d51f9f exclude main branch from staging
Poster
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.
Poster
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 1 year ago
merenber referenced this issue from a commit 1 year ago
merenber deleted branch merenber-ssh-deploy 1 year ago

Reviewers

a3thakra was requested for review 1 year ago
n3parikh was requested for review 1 year ago
continuous-integration/drone/push Build is passing
The pull request has been merged as a21e8f2f0c.
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: www/www-new#310
Loading…
There is no content yet.