add continuous deployment step
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
1fd1444f97
commit
1ad12900cc
32
.drone.yml
32
.drone.yml
|
@ -4,18 +4,26 @@ type: docker
|
||||||
name: build and publish docker image
|
name: build and publish docker image
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: docker
|
#- name: docker
|
||||||
image: plugins/docker
|
# image: plugins/docker
|
||||||
settings:
|
# settings:
|
||||||
username:
|
# username:
|
||||||
from_secret: gitea_packpub_username
|
# from_secret: gitea_packpub_username
|
||||||
password:
|
# password:
|
||||||
from_secret: gitea_packpub_password
|
# from_secret: gitea_packpub_password
|
||||||
registry: git.hatecomputers.club
|
# registry: git.hatecomputers.club
|
||||||
repo: git.hatecomputers.club/hatecomputers/hatecomputers.club
|
# repo: git.hatecomputers.club/hatecomputers/hatecomputers.club
|
||||||
tags:
|
# tags:
|
||||||
- latest
|
# - latest
|
||||||
- main
|
# - main
|
||||||
|
- name: continuous deployment
|
||||||
|
image: fedora:latest
|
||||||
|
commands:
|
||||||
|
- yum install --assumeyes
|
||||||
|
- sh deploy.sh
|
||||||
|
environment:
|
||||||
|
SSH_KEY:
|
||||||
|
from_secret: cd_ssh_key
|
||||||
trigger:
|
trigger:
|
||||||
branch:
|
branch:
|
||||||
- main
|
- main
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
echo $SSH_KEY >> /tmp/key
|
||||||
|
echo $SSH_KEY
|
||||||
|
echo $SSH_KEY | base64
|
||||||
|
echo $(cat /tmp/key)
|
||||||
|
chmod -R 0600 /tmp/key
|
||||||
|
|
||||||
|
ssh -i /tmp/key -o StrictHostKeyChecking=no root@hatecomputers.club "systemctl restart docker-compose@hatecomputers-club"
|
||||||
|
|
||||||
|
rm /tmp/key
|
Loading…
Reference in New Issue