ariadne.space/.woodpecker.yml

34 lines
1.3 KiB
YAML
Raw Permalink Normal View History

2022-08-02 23:15:11 +00:00
pipeline:
apko-image:
image: distroless.dev/apko:latest
commands:
- echo $REGISTRY_SECRET | apko login --username ariadne --password-stdin gitea.treehouse.systems
2022-12-03 07:27:48 +00:00
- apko publish --debug --arch $(uname -m) apko.yaml gitea.treehouse.systems/ariadne/ariadne.space-hugo:latest
2023-12-07 22:21:31 +00:00
secrets:
- REGISTRY_SECRET
2022-08-02 23:15:11 +00:00
deploy:
image: gitea.treehouse.systems/ariadne/ariadne.space-hugo:latest
2022-08-02 23:15:11 +00:00
commands:
# build the new site
- hugo
# fetch the old newswire
- curl -s https://ariadne.space/newswire.txt > oldnewswire.txt
# set up the SSH deployment key and upload the site
2023-12-07 22:21:31 +00:00
- |
2022-08-02 23:15:11 +00:00
mkdir $HOME/.ssh
echo "$SSH_KEY">$HOME/.ssh/id_ed25519
2022-08-02 23:20:15 +00:00
echo "$SSH_KNOWN_HOSTS">$HOME/.ssh/known_hosts
2022-08-02 23:21:54 +00:00
chown 600 $HOME/.ssh/id_ed25519
rsync -avHAX public/ kaniini@ariadne.space:public/
# if the newswire has changed, publish the new one.
2022-08-03 00:45:52 +00:00
- |
cmp oldnewswire.txt public/newswire.txt || \
curl -s -H "Authorization: Bearer $MASTODON_SECRET" \
-F "status=$(cat public/newswire.txt)" \
2023-12-07 22:21:31 +00:00
-F "content_type=text/markdown" \
2022-08-03 00:45:52 +00:00
https://social.treehouse.systems/api/v1/statuses
2023-12-07 22:21:31 +00:00
secrets:
- SSH_KEY
- SSH_KNOWN_HOSTS
- MASTODON_SECRET