leafee98-blog/.woodpecker/deploy.yml
2023-04-01 20:28:40 +08:00

12 lines
444 B
YAML

pipeline:
build:
image: 'myhugo:0.3'
commands:
- '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 ]