leafee98-blog/.woodpecker/deploy.yml

21 lines
626 B
YAML
Raw Normal View History

2024-03-04 06:07:34 +00:00
steps:
2024-07-08 16:31:08 +00:00
- name: build and deploy
when:
- branch: main
event: push
2023-03-31 14:19:16 +00:00
image: 'myhugo:0.3'
2024-12-14 05:43:18 +00:00
environment:
http_user:
from_secret: http_user
http_pass:
from_secret: http_pass
http_endpoint:
from_secret: http_endpoint
2023-03-31 13:27:44 +00:00
commands:
2023-03-31 14:19:16 +00:00
- '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"'