update woodpecker pipelines

This commit is contained in:
leafee98 2023-03-31 22:19:16 +08:00
parent 86f9a02230
commit 6e15f5a795

View file

@ -1,8 +1,11 @@
pipeline:
build:
image: docker.io/gohugoio/hugo
image: 'myhugo:0.3'
commands:
- /usr/bin/hugo
- tar -cf public.tar.gz --gzip -C public -T <(find public -mindepth 1 -not -type d -printf "%P\n")
- curl --user ${http_user}:${http_pass} --binary-data public.tar.gz ${http_endpoint}
- 'hugo'
- 'find public -mindepth 1 -not -type d -printf "%P\n" > /tmp/filelist'
- 'tar -cf public.tar.gz --gzip -C public -T /tmp/filelist'
- 'response=$(curl --silent --user $HTTP_USER:$HTTP_PASS --data-binary @public.tar.gz $HTTP_ENDPOINT)'
- 'echo "$response"'
- 'test "$response" = "Success"'
secrets: [ http_user, http_pass, http_endpoint ]