ariadne.space/.woodpecker.yml

21 lines
882 B
YAML

pipeline:
deploy:
image: distroless.dev/alpine-base:latest
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
- echo '' >>/etc/apk/repositories
- echo 'https://dl-cdn.alpinelinux.org/alpine/edge/community' >> /etc/apk/repositories
- 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]