This commit is contained in:
Elizabeth Hunt 2024-04-29 21:01:09 -07:00
parent c10f93f556
commit c255fefb22
Signed by: simponic
GPG Key ID: 2909B9A7FF6213EE
2 changed files with 30 additions and 0 deletions

20
.drone.yml Normal file
View File

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

10
deploy.sh Executable file
View File

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