about summary refs log tree commit diff
path: root/.build.yml
blob: 038ff62155898a561a532aecd56aa8e714a4a8fe (plain) (blame)
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
image: debian/bullseye
oauth: pages.sr.ht/PAGES:RW
packages:
  - golang
  - hugo
environment:
  site: huyngo.srht.site
tasks:
- install: |
    git clone https://git.sr.ht/~sircmpwn/openring
    cd openring
    go build -o openring
    sudo cp openring /usr/local/bin/
- embed:
    git clone https://git.disroot.org/huyngo/conlang
    cp -r conlang/src $site/content/conlang
    cd $site/content/conlang
    mv index.md _index.md
    sed "s/\//_/g" SUMMARY.md | sed "s/\._/.\//g" | sed "s/.md/\//g" | grep -v "Introduction" >> _index.md
    rm SUMMARY.md
    for file in $(find -type f); do ../../add-front-matter.sh $file; done
    find -type f | grep "sh$" | xargs rm
- package: |
    cd $site
    ./create-webring.sh
    hugo
    cd public
    cp -r ../../conlang/book/ conlang
    tar -cvz . > ../../site.tar.gz
- upload: |
    acurl -f https://pages.sr.ht/publish/$site -Fcontent=@site.tar.gz