aboutsummaryrefslogtreecommitdiff
path: root/.build.yml
blob: f452fad062e5a30ea0f61b42e622c9cc7ac528c5 (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
image: debian/testing
packages:
    - python3-pip
    - poppler-utils
    - rsync
sources:
    - https://git.sr.ht/~boringcactus/crowbar-spec
secrets:
    - b5cb9b2b-1461-4486-95e1-886451674a89
tasks:
    - prep: |
        sudo pip3 install --progress-bar off sphinx recommonmark rinohtype regex
    - build-and-test: |
        cd crowbar-spec
        make all check
    - compress: |
        cd crowbar-spec/_build/html
        tar czf ../crowbar-spec-html.tar.gz *
        cd ../gmi
        tar czf ../crowbar-spec-gmi.tar.gz *
    - upload: |
        upload-to() {
            dest=$1
            shift
            rsync --rsh="ssh -o StrictHostKeyChecking=no" -rlt8hP --del $@ services@boringcactus.com:$dest
        }
        cd crowbar-spec/_build/html
        upload-to /var/www/html/crowbar-lang.org/ * ../rinoh/crowbar-spec.pdf ../epub/crowbar-spec.epub
        cd ../gmi
        upload-to /var/gemini/gmi/crowbar-lang.org/ * ../rinoh/crowbar-spec.pdf ../epub/crowbar-spec.epub
artifacts:
    - crowbar-spec/_build/rinoh/crowbar-spec.pdf
    - crowbar-spec/_build/epub/crowbar-spec.epub
    - crowbar-spec/_build/crowbar-spec-html.tar.gz
    - crowbar-spec/_build/crowbar-spec-gmi.tar.gz