~nabijaczleweli/html-readme

ref: 9e3fceab1231c58ee07d5d83e1500f2e8aef4ba7 html-readme/.build.yml -rw-r--r-- 755 bytes
9e3fceabнаб Also link to the source 1 year, 3 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
image: debian/bullseye
packages:
  - ronn
  - curl
secrets:
  - 8d4dfb87-e056-4f68-abae-0da7ba5d4398
tasks:
  - build: |
      cd html-readme
      awk '/BUILD_YML_PLACEHOLDER/ {print "_PRE"; while(getline < ".build.yml") print; print "__PRE"; next}  //' html-readme.md | \
      ronn -f | \
      sed -e 's;^__PRE$;</pre>;' -e 's;^_PRE$;<pre>;' > ~/README.html
  - readme: |
      set +x  # Avoid echoing the token
      curl -H "Content-Type: text/html"                      \
           -H "Authorization: Bearer $(cat ~/.readme-token)" \
           -XPUT                                             \
           --data-binary @README.html                        \
           'https://git.sr.ht/api/repos/html-readme/readme' &&
      echo "README set"