leafee98-blog/.woodpecker/deploy.yml
leafee98 96c94634a6
Some checks failed
ci/woodpecker/push/deploy Pipeline failed
Edit woodpecker ci to migrate to 3.0.0
2024-12-14 13:45:29 +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"'