leafee98-blog/.woodpecker/deploy.yml
leafee98 2ae4d60221
All checks were successful
ci/woodpecker/push/deploy Pipeline was successful
Edit woodpecker ci secrets
2024-12-14 13:58:14 +08:00

21 lines
626 B
YAML

steps:
- name: build and deploy
when:
- branch: main
event: push
image: 'myhugo:0.3'
environment:
HTTP_USER:
from_secret: HTTP_USER
HTTP_PASS:
from_secret: HTTP_PASS
HTTP_ENDPOINT:
from_secret: HTTP_ENDPOINT
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"'