blog/.build.yml

28 lines
732 B
YAML
Raw Normal View History

2024-04-02 13:50:38 +00:00
image: alpine/latest
2024-04-02 14:19:48 +00:00
oauth: pages.sr.ht/PAGES:RW
2024-04-02 13:50:38 +00:00
packages:
2024-04-02 14:19:48 +00:00
- hut
2024-04-02 13:53:15 +00:00
- npm
2024-04-02 13:50:38 +00:00
- rsync
2024-04-02 14:19:48 +00:00
environment:
2024-04-02 15:01:06 +00:00
site: mzhang.io
2024-04-02 13:50:38 +00:00
secrets:
- 0b26b413-7901-41c3-a4e2-3c752228ffcb
sources:
- https://git.sr.ht/~mzhang/blog
tasks:
2024-04-02 13:55:31 +00:00
- install: |
sudo npm install -g pnpm
2024-04-02 13:50:38 +00:00
- build: |
cd blog
pnpm install
pnpm run build
# hugo --buildDrafts --minify --baseURL https://mzhang.io
- upload: |
2024-04-02 14:19:48 +00:00
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