neur0toxine.pages.neur0tx.site/.drone.yml
Neur0toxine 78b447d049
Some checks failed
continuous-integration/drone/push Build is failing
create ssh dir
2023-11-12 23:03:55 +03:00

37 lines
903 B
YAML

kind: pipeline
type: docker
name: default
steps:
- name: generate
image: golang:1.19-alpine
commands:
- apk add --no-cache curl make bash
- make all
- name: release
image: alpine:latest
environment:
SSH_KEY:
from_secret: ssh_key
commands:
- apk add --no-cache git openssh
- mkdir -p $HOME/.ssh
- echo "$SSH_KEY" > $HOME/.ssh/id_rsa
- chmod 600 $HOME/.ssh/known_hosts
- ssh-keyscan -H git.neur0tx.site > ~/.ssh/known_hosts 2> /dev/null
- cd .pub
- git clone --filter=tree:0 git@git.neur0tx.site:Neur0toxine/neur0tx.site.git
- cd neur0tx.site
- git checkout gitea-pages || git checkout -b gitea-pages
- cd ..
- mv neur0tx.site/.git .
- rm -rf neur0tx.site
- git add .
- git commit -a -m "`date +'%Y-%m-%d %R:%S'` > deploy"
- git push -u origin gitea-pages
- cd ..
- rm -rf .pub
trigger:
branch:
- master