Build AND publish in custom hugo docker image
Some checks reported errors
continuous-integration/drone/push Build encountered an error

This commit is contained in:
Sivert V. Sæther 2023-02-06 05:06:15 +00:00
parent 5b1f07baad
commit e0f0deeb6e

View File

@ -6,26 +6,15 @@ name: build and publish
steps:
- name: build
image: registry.42069.no/build/hugo
volumes:
- name: public
path: /work/public
environment:
KEY:
from_secret: key
commands:
- echo "$KEY" > ~/.ssh/id_rsa
- hugo -e prod --printI18nWarnings --printPathWarnings --printUnusedTemplates --templateMetricsHints
- name: publish
image: plugins/gh-pages
volumes:
- name: public
path: /public
settings:
pages_directory: /public
username: Ghost-Zephyr
password:
from_secret: password
volumes:
- name: public
temp: {}
- git clone --branch gh-pages git@github.com:Ghost-Zephyr/Ghost-Zephyr.github.io.git github
- cp -r public/* github/
- cd github/ && git add -A && git commit -m 'Drone CI!~'
image_pull_secrets:
- registry