ariadne.space/.woodpecker.yml

21 lines
882 B
YAML
Raw Normal View History

2022-08-02 23:15:11 +00:00
pipeline:
deploy:
2022-08-03 01:55:05 +00:00
image: distroless.dev/alpine-base:latest
2022-08-02 23:15:11 +00:00
commands:
- |
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
2022-08-03 01:55:05 +00:00
- echo '' >>/etc/apk/repositories
- echo 'https://dl-cdn.alpinelinux.org/alpine/edge/community' >> /etc/apk/repositories
2022-08-03 00:28:51 +00:00
- apk add hugo rsync openssh-client go git curl
2022-08-02 23:15:11 +00:00
- hugo
2022-08-03 00:45:52 +00:00
- wget -O oldnewswire.txt https://ariadne.space/newswire.txt
2022-08-02 23:15:11 +00:00
- rsync -avzHAX public/ kaniini@ariadne.space:public/
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)" \
https://social.treehouse.systems/api/v1/statuses
2022-08-03 00:28:51 +00:00
secrets: [SSH_KEY, SSH_KNOWN_HOSTS, MASTODON_SECRET]