ariadne.space/.woodpecker.yml

19 lines
722 B
YAML

pipeline:
deploy:
image: alpine
commands:
- |
mkdir $HOME/.ssh
echo "$SSH_KEY">$HOME/.ssh/id_ed25519
echo "$SSH_KNOWN_HOSTS">$HOME/.ssh/known_hosts
chown 600 $HOME/.ssh/id_ed25519
- apk add hugo rsync openssh-client go git curl
- hugo
- wget -O oldnewswire.txt https://ariadne.space/newswire.txt
- rsync -avzHAX public/ kaniini@ariadne.space:public/
- |
cmp oldnewswire.txt public/newswire.txt || \
curl -s -H "Authorization: Bearer $MASTODON_SECRET" -F "status=$(cat public/newswire.txt)" \
https://social.treehouse.systems/api/v1/statuses
secrets: [SSH_KEY, SSH_KNOWN_HOSTS, MASTODON_SECRET]