homepage/.gitea/workflows/build.yaml

26 lines
680 B
YAML
Raw Normal View History

2023-10-27 14:53:05 -06:00
name: Homepage
on: [push]
jobs:
2023-10-27 22:39:32 -06:00
publish:
2023-10-27 20:52:19 -06:00
runs-on:
2023-10-27 20:53:16 -06:00
- hugo
2023-10-27 22:10:28 -06:00
timeout-minutes: 1
2023-10-27 14:53:05 -06:00
steps:
2023-10-27 22:05:48 -06:00
- name: Set up SSH
2023-10-27 21:33:32 -06:00
run: |
mkdir -p $HOME/.ssh
2023-10-27 22:15:42 -06:00
cat > $HOME/.ssh/known_hosts <<EOD
2023-10-27 22:16:22 -06:00
${{ secrets.SSH_KNOWN_HOSTS }}
2023-10-27 22:15:42 -06:00
EOD
2023-10-27 21:36:48 -06:00
umask 077; cat > $HOME/.ssh/id_rsa <<EOD
${{ secrets.SSH_PUBLISH_PRIVATE_KEY }}
EOD
2023-10-27 22:19:23 -06:00
md5sum $HOME/.ssh/*
2023-10-27 22:39:32 -06:00
- run: git clone $GITHUB_SERVER_URL/$GITHUB_REPOSITORY .
2023-10-27 22:22:10 -06:00
- run: hugo
2023-10-27 22:19:23 -06:00
- name: Install built site
run: |
2023-10-27 22:13:14 -06:00
eval $(ssh-agent)
2023-10-27 22:19:23 -06:00
ssh-add
2023-10-27 22:20:18 -06:00
rsync --delete -vax ./public/ neale@melville.woozle.org:/srv/www/woozle.org/