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