aboutsummaryrefslogtreecommitdiff
path: root/.build.yml
blob: 6771d96b09b0648a01ba1626a2a5e41cab016077 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
image: debian/testing
packages:
    - pandoc
    - weasyprint
    - poppler-utils
    - sic
    - rsync
sources:
    - https://git.sr.ht/~boringcactus/crowbar-spec
secrets:
    - b5cb9b2b-1461-4486-95e1-886451674a89
tasks:
    - build: |
        cd crowbar-spec
        make
    - compress: |
        tar czf spec-html.tar.gz crowbar-spec/*.html
        tar czf spec-gmi.tar.gz crowbar-spec/*.gmi
    - test-page-count: |
        cd crowbar-spec
        make check
    - upload: |
        upload-to() {
            dest=$1
            shift
            rsync --rsh="ssh -o StrictHostKeyChecking=no" -rlt8hP --del $@ services@boringcactus.com:$dest
        }
        cd crowbar-spec
        upload-to /var/www/html/crowbar-lang.org/ *.html spec.pdf
        upload-to /var/gemini/gmi/crowbar-lang.org/ *.gmi spec.pdf
    - notify: |
        cd crowbar-spec
        message="crowbar spec updated: $(git log -1 --no-decorate --oneline)"
        echo "/NOTICE #crowbar-lang :$message" | ssh -o StrictHostKeyChecking=no services@boringcactus.com 'sh -c "cat > ~/irc/chat.freenode.net/#crowbar-lang/in"'
artifacts:
    - crowbar-spec/spec.pdf
    - spec-html.tar.gz
    - spec-gmi.tar.gz