2023-02-06 03:52:11 +00:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: build and publish
|
|
|
|
|
2023-02-06 05:11:18 +00:00
|
|
|
steps:
|
|
|
|
- name: build and publish
|
|
|
|
image: registry.42069.no/build/hugo
|
|
|
|
environment:
|
|
|
|
KEY:
|
|
|
|
from_secret: key
|
|
|
|
commands:
|
|
|
|
- mkdir ~/.ssh && echo "$KEY" > ~/.ssh/id_rsa && chmod 600 -R ~/.ssh
|
2023-02-06 05:37:13 +00:00
|
|
|
- hugo -e prod --printI18nWarnings --printUnusedTemplates --templateMetricsHints
|
2023-02-06 05:17:10 +00:00
|
|
|
- ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
|
2023-02-06 05:11:18 +00:00
|
|
|
- git clone --branch gh-pages git@github.com:Ghost-Zephyr/Ghost-Zephyr.github.io.git github
|
2023-02-06 05:37:13 +00:00
|
|
|
- rm -fr github/* && cp -r public/* github/
|
2023-02-06 05:30:11 +00:00
|
|
|
- cd github/ && git add -A && git commit -m "Drone CI!~ $(git rev-parse --short HEAD)" && git push
|
2023-02-06 04:50:09 +00:00
|
|
|
|
2023-02-06 04:32:04 +00:00
|
|
|
image_pull_secrets:
|
2023-02-06 04:33:59 +00:00
|
|
|
- registry
|
|
|
|
|