cd
This commit is contained in:
parent
c10f93f556
commit
c255fefb22
20
.drone.yml
Normal file
20
.drone.yml
Normal 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
10
deploy.sh
Executable 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
|
Loading…
Reference in New Issue
Block a user