sourcehut publish

This commit is contained in:
Michael Zhang 2024-04-02 09:19:48 -05:00
parent e1cb9b5e0f
commit 4dafc1b3e8

View file

@ -1,7 +1,11 @@
image: alpine/latest
oauth: pages.sr.ht/PAGES:RW
packages:
- hut
- npm
- rsync
environment:
site: mzhang.srht.site
secrets:
- 0b26b413-7901-41c3-a4e2-3c752228ffcb
sources:
@ -15,6 +19,9 @@ tasks:
pnpm run build
# hugo --buildDrafts --minify --baseURL https://mzhang.io
- upload: |
cd blog
echo "mzhang.io ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBzBZ+QmM4EO3Fwc1ZcvWV2IY9VF04T0H9brorGj9Udp" >> ~/.ssh/known_hosts
rsync -azvrP dist/ sourcehutBuilds@mzhang.io:/mnt/storage/svcdata/blog-public
cd blog/dist
tar -cvz . > ../site.tar.gz
cd ..
hut pages publish -d $site site.tar.gz
# echo "mzhang.io ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBzBZ+QmM4EO3Fwc1ZcvWV2IY9VF04T0H9brorGj9Udp" >> ~/.ssh/known_hosts
# rsync -azvrP dist/ sourcehutBuilds@mzhang.io:/mnt/storage/svcdata/blog-public