2023-06-11 12:50:50 +02:00
|
|
|
---
|
2023-06-11 10:28:14 +02:00
|
|
|
kind: pipeline
|
2023-06-11 12:50:50 +02:00
|
|
|
type: ssh
|
|
|
|
name: production
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
branch:
|
|
|
|
- main
|
|
|
|
|
|
|
|
server:
|
2023-06-11 12:59:14 +02:00
|
|
|
host: homelab-blog.lan
|
2023-06-11 12:50:50 +02:00
|
|
|
user: root
|
|
|
|
ssh_key:
|
|
|
|
from_secret: ssh_key
|
2023-06-11 10:28:14 +02:00
|
|
|
|
|
|
|
steps:
|
2023-06-11 12:50:50 +02:00
|
|
|
- name: initialize
|
|
|
|
commands:
|
|
|
|
- git submodule update --init
|
|
|
|
- hugo version
|
|
|
|
# - ln -s /home/hebron/hugo_resources/production resources
|
2023-06-11 12:38:05 +02:00
|
|
|
|
2023-06-11 13:27:06 +02:00
|
|
|
- name: build staging
|
2023-06-11 12:50:50 +02:00
|
|
|
commands:
|
2023-06-11 13:27:06 +02:00
|
|
|
- hugo --gc --minify --buildDrafts -b https://blog.broillet.ch/
|
|
|
|
- name: copy staging build
|
|
|
|
commands:
|
|
|
|
- mkdir -p /var/www/html/staging/
|
|
|
|
- cp -R public/* /var/www/html/staging/
|
2023-06-11 12:20:43 +02:00
|
|
|
|
2023-06-11 13:27:06 +02:00
|
|
|
- name: build production
|
|
|
|
commands:
|
|
|
|
- hugo --gc --minify -b https://blog.broillet.ch/
|
|
|
|
- name: copy production build
|
2023-06-11 12:56:02 +02:00
|
|
|
commands:
|
2023-06-11 13:27:06 +02:00
|
|
|
- mkdir -p /var/www/html/prod/
|
|
|
|
- cp -R public/* /var/www/html/prod/
|