diff options
| author | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2024-04-29 21:01:09 -0700 |
|---|---|---|
| committer | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2024-04-29 21:01:09 -0700 |
| commit | c255fefb2240e0e2605a42f3f8f8a3944f9ed2c2 (patch) | |
| tree | 4c30be1e074761e044dd4ef68658657d052f0a31 | |
| parent | c10f93f556363a7f543065e3b8537511c34e0b22 (diff) | |
| download | mistymountainstherapy-c255fefb2240e0e2605a42f3f8f8a3944f9ed2c2.tar.gz mistymountainstherapy-c255fefb2240e0e2605a42f3f8f8a3944f9ed2c2.zip | |
cd
| -rw-r--r-- | .drone.yml | 20 | ||||
| -rwxr-xr-x | deploy.sh | 10 |
2 files changed, 30 insertions, 0 deletions
diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..205eb86 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,20 @@ +--- +kind: pipeline +type: docker +name: default + +steps: +- name: build + image: fedora:39 + commands: + - yum install --assumeyes openssh + - sh deploy.sh + environment: + HOST: + from_secret: HOST + SSH_KEY: + from_secret: SSH_KEY + +trigger: + branch: + - main diff --git a/deploy.sh b/deploy.sh new file mode 100755 index 0000000..bb2e026 --- /dev/null +++ b/deploy.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +set -e + +echo $SSH_KEY | base64 -d >> /tmp/key +chmod -R 0600 /tmp/key + +ssh -i /tmp/key -o StrictHostKeyChecking=no $HOST "cd /home/lizzy/mistymountains && git pull && git reset --hard origin/master && npm run build && sudo systemctl restart mmt" + +rm /tmp/key |
