website/.woodpecker/.hugo-build.yml

54 lines
2 KiB
YAML
Raw Normal View History

2023-10-01 17:41:47 +02:00
steps:
build-stable:
2023-05-17 13:16:09 +02:00
image: code.cozy.town/vrifox/hugoci:latest
2023-03-26 00:00:23 +01:00
commands:
- hugo --destination /woodpecker/build/ --minify --cleanDestinationDir
2025-02-18 18:54:59 +01:00
volumes:
- /srv/woodpecker-cache/vrifox.cc:/woodpecker/src/code.cozy.town/vrifox/website/resources/_gen
when:
2025-02-18 18:54:59 +01:00
- branch: main
event: [push, pull_request_closed, manual]
2023-03-27 16:17:59 +02:00
2025-02-18 18:54:59 +01:00
build-dev:
2023-05-17 13:16:09 +02:00
image: code.cozy.town/vrifox/hugoci:latest
2023-03-27 16:17:59 +02:00
commands:
2025-02-18 18:54:59 +01:00
- hugo --destination /woodpecker/build/ --baseURL "https://dev.vrifox.cc/" --cleanDestinationDir
volumes:
- /srv/woodpecker-cache/vrifox.cc:/woodpecker/src/code.cozy.town/vrifox.cc/website/resources/_gen
2023-05-17 17:57:02 +02:00
when:
2025-02-18 18:54:59 +01:00
- branch:
exclude: main
event: [push, pull_request, manual]
2023-05-17 17:57:02 +02:00
2025-02-18 18:54:59 +01:00
upload-stable:
2023-05-17 17:57:02 +02:00
image: code.cozy.town/vrifox/hugoci:latest
commands:
2025-02-18 18:54:59 +01:00
- mkdir -p /root/.ssh
- echo "$${DEPLOY_BOT_SSH_KEY}" > /root/.ssh/id_ed25519
- chmod 400 /root/.ssh/id_ed25519
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > /root/.ssh/config
- rsync -rv --delete -e "ssh -p 42824 -i /root/.ssh/id_ed25519" /woodpecker/build/ deploy-bot@$cozytown-main.cozy.town:/srv/http/vrifox.cc/ --mkpath --checksum
environment:
DEPLOY_BOT_SSH_KEY:
from_secret: deploy_bot_ssh_key
when:
2025-02-18 18:54:59 +01:00
- branch: main
event: [push, pull_request_closed, manual]
2023-03-29 20:13:51 +02:00
2023-04-05 22:17:53 +02:00
upload-dev:
2023-05-17 13:16:09 +02:00
image: code.cozy.town/vrifox/hugoci:latest
commands:
- mkdir -p /root/.ssh
2025-02-18 18:54:59 +01:00
- echo "$${DEPLOY_BOT_SSH_KEY}" > /root/.ssh/id_ed25519
- chmod 400 /root/.ssh/id_ed25519
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > /root/.ssh/config
2025-02-18 18:54:59 +01:00
- rsync -rv --delete -e "ssh -p 42824 -i /root/.ssh/id_ed25519" /woodpecker/build/ deploy-bot@cozytown-main.cozy.town:/srv/http/vrifox.cc-dev/ --mkpath --checksum
- echo "The preview is now available on https://dev.vrifox.cc/"
environment:
DEPLOY_BOT_SSH_KEY:
from_secret: deploy_bot_ssh_key
2023-04-05 22:40:03 +02:00
when:
2025-02-18 18:54:59 +01:00
- branch:
exclude: main
event: [push, pull_request, manual]