2023-11-12 22:41:53 +03:00
|
|
|
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
|
2023-11-12 23:01:58 +03:00
|
|
|
environment:
|
|
|
|
SSH_KEY:
|
|
|
|
from_secret: ssh_key
|
2023-11-12 22:41:53 +03:00
|
|
|
commands:
|
2023-11-12 22:49:24 +03:00
|
|
|
- apk add --no-cache git openssh
|
2023-11-12 23:03:55 +03:00
|
|
|
- mkdir -p $HOME/.ssh
|
2023-11-12 23:01:58 +03:00
|
|
|
- echo "$SSH_KEY" > $HOME/.ssh/id_rsa
|
2023-11-12 23:06:26 +03:00
|
|
|
- ssh-keyscan -H git.neur0tx.site > $HOME/.ssh/known_hosts 2> /dev/null
|
2023-11-12 23:08:03 +03:00
|
|
|
- chmod -R 600 $HOME/.ssh
|
2023-11-12 22:41:53 +03:00
|
|
|
- cd .pub
|
2023-11-12 23:56:17 +03:00
|
|
|
- git clone --filter=tree:0 git@git.neur0tx.site:Neur0toxine/neur0toxine.pages.neur0tx.site.git site
|
|
|
|
- cd site
|
2023-11-12 22:41:53 +03:00
|
|
|
- git checkout gitea-pages || git checkout -b gitea-pages
|
|
|
|
- cd ..
|
2023-11-12 23:56:17 +03:00
|
|
|
- mv site/.git .
|
|
|
|
- rm -rf site
|
2023-11-12 22:41:53 +03:00
|
|
|
- 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
|