commit c4d41fe757dbbde3c71f66d5bbbbf416608a3e2c
parent e7de0a6daaed219e08d8af34a8061fb4d737e8e7
Author: Drew DeVault <sir@cmpwn.com>
Date: Wed, 21 Apr 2021 10:06:25 -0400
Rig up docs to build
Diffstat:
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/.build.yml b/.build.yml
@@ -1,4 +1,5 @@
image: alpine/latest
+oauth: pages.sr.ht/PAGES:RW
sources:
- https://git.sr.ht/~sircmpwn/qbe
- https://git.sr.ht/~sircmpwn/harec
@@ -24,3 +25,14 @@ tasks:
- check: |
cd hare
make check
+- docs: |
+ if [ $BUILD_SUBMITTER != "git.sr.ht" ]
+ then
+ echo "Skipping docs for non-git.sr.ht build"
+ exit
+ fi
+ cd hare
+ . hare.sh
+ ./scripts/gen-docs
+ tar -C docs/html -cvz . > docs.tar.gz
+ acurl -f https://pages.sr.ht/publish/docs.harelang.org -Fcontent=@docs.tar.gz
diff --git a/cmd/haredoc/html.ha b/cmd/haredoc/html.ha
@@ -531,7 +531,7 @@ details pre {
</style>
<nav>
<img
- src='https://harelang.org/mascot.jpg'
+ src='/mascot.jpg'
alt='An inked drawing of the Hare mascot, a fuzzy rabbit'
width='128' height='128' />
<h1>Hare documentation</h1>
diff --git a/scripts/gen-docs b/scripts/gen-docs
@@ -8,6 +8,7 @@ modules=$(awk '
mkdir -p docs/html/
+curl https://harelang.org/mascot.jpg > docs/html/mascot.jpg
haredoc -Fhtml > docs/html/index.html
for mod in $modules
do