21 lines
626 B
YAML
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"'
|