2024-09-02 09:17:32 +03:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: docker-build-and-push
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
branch:
|
2024-09-02 21:35:52 +03:00
|
|
|
- master
|
2024-09-02 09:17:32 +03:00
|
|
|
|
2024-09-02 21:38:16 +03:00
|
|
|
image_pull_secrets:
|
|
|
|
- DOCKER_AUTH
|
|
|
|
|
2024-09-03 07:55:40 +03:00
|
|
|
# services:
|
|
|
|
# - name: docker
|
|
|
|
# # https://hub.docker.com/r/library/docker
|
|
|
|
# image: hub.docker.struchkov.dev/docker:27.1.2-dind-alpine3.20
|
|
|
|
# privileged: true
|
|
|
|
# volumes:
|
|
|
|
# - name: dockersock
|
|
|
|
# path: /var/run
|
|
|
|
|
|
|
|
# volumes:
|
|
|
|
# - name: dockersock
|
|
|
|
# temp: {}
|
2024-09-02 21:38:16 +03:00
|
|
|
|
2024-09-02 09:17:32 +03:00
|
|
|
steps:
|
2024-09-02 21:35:14 +03:00
|
|
|
- name: build site
|
2024-09-02 09:17:32 +03:00
|
|
|
# https://hub.docker.com/r/library/docker
|
2024-09-03 07:55:40 +03:00
|
|
|
image: docker.struchkov.dev/quartz:latest
|
|
|
|
# volumes:
|
|
|
|
# - name: dockersock
|
|
|
|
# path: /var/run
|
2024-09-02 09:17:32 +03:00
|
|
|
commands:
|
2024-09-03 07:55:40 +03:00
|
|
|
# - sleep 15
|
2024-09-03 08:06:12 +03:00
|
|
|
- cp -r ./* /usr/src/app/content
|
2024-09-03 08:07:14 +03:00
|
|
|
- cp ./.quartz/quartz.config.ts /usr/src/app/
|
|
|
|
- cp ./.quartz/quartz.layout.ts /usr/src/app/
|
2024-09-03 08:06:12 +03:00
|
|
|
- cd /usr/src/app/
|
2024-09-03 07:55:40 +03:00
|
|
|
- npx quartz build
|
2024-09-02 21:35:14 +03:00
|
|
|
- name: publish to server
|
2024-09-02 21:43:05 +03:00
|
|
|
image: private.docker.struchkov.dev/mkdocs:latest
|
2024-09-02 21:35:14 +03:00
|
|
|
environment:
|
|
|
|
SSH_DEPLOY_KEY:
|
|
|
|
from_secret: SSH_DEPLOY_KEY
|
|
|
|
SSH_DEPLOY_HOST:
|
|
|
|
from_secret: SSH_DEPLOY_HOST
|
|
|
|
SSH_DEPLOY_PORT:
|
|
|
|
from_secret: SSH_DEPLOY_PORT
|
|
|
|
SSH_DEPLOY_PATH:
|
|
|
|
from_secret: SSH_DEPLOY_PATH
|
|
|
|
SSH_DEPLOY_USER:
|
|
|
|
from_secret: SSH_DEPLOY_USER
|
|
|
|
commands:
|
|
|
|
- eval $(ssh-agent -s)
|
|
|
|
- mkdir -p ~/.ssh
|
|
|
|
- echo "$SSH_DEPLOY_KEY" >> ~/.ssh/id_rsa
|
|
|
|
- chmod 700 ~/.ssh
|
|
|
|
- chmod 600 ~/.ssh/id_rsa
|
|
|
|
- ssh-keyscan -p $SSH_DEPLOY_PORT $SSH_DEPLOY_HOST >> ~/.ssh/known_hosts
|
|
|
|
- chmod 644 ~/.ssh/known_hosts
|
2024-09-03 08:06:12 +03:00
|
|
|
- ls -la
|
|
|
|
# - scp -r -P $SSH_DEPLOY_PORT ./public/* $SSH_DEPLOY_USER@$SSH_DEPLOY_HOST:$SSH_DEPLOY_PATH
|
2024-09-02 21:35:14 +03:00
|
|
|
|
2024-09-02 09:17:32 +03:00
|
|
|
|
2024-09-02 21:35:14 +03:00
|
|
|
# drone sign --save upagge/digital-garden
|
2024-09-02 09:17:32 +03:00
|
|
|
---
|
|
|
|
kind: signature
|
2024-09-03 08:07:14 +03:00
|
|
|
hmac: da7dbe422e9b2faed8e983c435a1f1ecf0867214b468df721115b4598a7d7a4d
|
2024-09-02 09:17:32 +03:00
|
|
|
|
2024-09-02 21:35:14 +03:00
|
|
|
...
|