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 - ssh-keyscan -H git.neur0tx.site > $HOME/.ssh/known_hosts 2> /dev/null - chmod -R 600 $HOME/.ssh - cd .pub - git clone --filter=tree:0 git@git.neur0tx.site:Neur0toxine/neur0toxine.pages.neur0tx.site.git site - cd site - git checkout gitea-pages || git checkout -b gitea-pages - cd .. - mv site/.git . - rm -rf 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