c44e2f09a7cf4f3e224fff091113a85f9ae82ac5
[~bandali/bndl.org] / .build.yml
1 image: archlinux
2 packages:
3 - rsync
4 - wget
5 sources:
6 - https://git.sr.ht/~aminb/aminb.org
7 environment:
8 deploy: deploy@aminb.org
9 hugo_version: "0.48"
10 secrets:
11 - 12deb555-3219-4d9d-b4c7-ffeda86ef5fe
12 tasks:
13 - setup: |
14 wget "https://github.com/gohugoio/hugo/releases/download/v${hugo_version}/hugo_extended_${hugo_version}_Linux-64bit.tar.gz"
15 wget "https://github.com/gohugoio/hugo/releases/download/v${hugo_version}/hugo_extended_${hugo_version}_checksums.txt"
16 calculated_sha=$(sha256sum "hugo_extended_${hugo_version}_Linux-64bit.tar.gz")
17 expected_sha=$(grep "hugo_extended_${hugo_version}_Linux-64bit.tar.gz" "hugo_extended_${hugo_version}_checksums.txt")
18 printf "calculated: %s\n expected: %s" "$calculated_sha" "$expected_sha"
19 [ "$calculated_sha" = "$expected_sha" ]
20 tar xzf "hugo_extended_${hugo_version}_Linux-64bit.tar.gz"
21 - build: |
22 cd aminb.org
23 ../hugo --minify
24 - deploy: |
25 cd aminb.org
26 sshopts="-o StrictHostKeyChecking=no"
27 rsync --rsh="ssh $sshopts" -rP public/ ${deploy}:/var/www/aminb/html/