diff --git a/README.md b/README.md index 94afb7d5..200fe228 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,13 @@ This is Yaws, a webserver for dynamic content written in Erlang. ![Build Status](https://github.com/erlyaws/yaws/actions/workflows/main.yml/badge.svg) +Yaws Web Page +------------- + +The +[Yaws Web Page](https://erlyaws.github.io/) is available online with +documentation and examples. + Yaws Mailing List ----------------- diff --git a/scripts/update-gh-pages b/scripts/update-gh-pages new file mode 100755 index 00000000..877e1905 --- /dev/null +++ b/scripts/update-gh-pages @@ -0,0 +1,48 @@ +#!/bin/sh + +set -e + +[ -f LICENSE ] || { echo "Not in source tree root"; exit 1; } + +YAWS_ROOT="$PWD" +BUILD_ROOT="$YAWS_ROOT/build" +mkdir -p "$BUILD_ROOT" +BUILD_DIR="$(mktemp -d "$BUILD_ROOT/gh-pages.XXXX")" +INST_DIR="$BUILD_DIR/_inst" +REPO=erlyaws.github.io +YAWS_ID=update-gh-pages-yaws-server-$(date +%s) + +# FIXME cleanup when automating this +# cleanup upon exit +trap "pkill -f $YAWS_ID; rm -rf \"$BUILD_ROOT\"" 0 1 2 3 15 + +# build and install yaws +cd "$YAWS_ROOT" +mkdir -p "$INST_DIR" +autoreconf -fiv +./configure --prefix="$INST_DIR" +make all install + +# start yaws +# FIXME --id doesn't seem to work +"$INST_DIR"/bin/yaws --daemon #--id $YAWS_ID +"$INST_DIR"/bin/yaws --wait-started #--id $YAWS_ID + +# clone erlyaws.github.io gh-pages repo +cd "$BUILD_DIR" +git clone git@github.com:erlyaws/$REPO + +# mirror the site +wget --mirror \ + --max-redirect 0 \ + --directory-prefix $REPO \ + --no-host-directories \ + localhost:8000 + +# FIXME stop yaws + +# push updates +cd $REPO +git add . +git commit -av -m "Update gh-pages" +git push origin main diff --git a/www/TAB.inc b/www/TAB.inc index 6df443c1..c2814f9f 100644 --- a/www/TAB.inc +++ b/www/TAB.inc @@ -28,7 +28,7 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- + diff --git a/www/index.yaws b/www/index.yaws index 921ba452..e1a5ca37 100644 --- a/www/index.yaws +++ b/www/index.yaws @@ -30,13 +30,13 @@ out(A) -> "well. Web applications don't have to be written in ugly ad hoc " "languages."}, - {h2,[], "yaws.hyber.org"}, + {h2,[], "erlyaws.github.io"}, {p,[], ["The www page for Yaws is ", - {a ,[{href,"http://yaws.hyber.org"}], "yaws.hyber.org"}, + {a ,[{href,"http://erlyaws.github.io"}], "erlyaws.github.io"}, ". The documentation, examples as well as releases can be " "found there, and of course, ", - {a ,[{href,"http://yaws.hyber.org"}],"yaws.hyber.org"}, + {a ,[{href,"http://erlyaws.github.io"}],"erlyaws.github.io"}, " is itself powered by Yaws."]}, @@ -45,8 +45,10 @@ out(A) -> "http://github.com/erlyaws/yaws"}]}, {p, [], ["Travis test results at :", - {a, [{href, "https://travis-ci.org/klacke/yaws"}], - "https://travis-ci.org/klacke/yaws"}]}, + {a, [{href, "https://github.com/erlyaws/yaws/actions" + "/workflows/main.yml"}], + "https://github.com/erlyaws/yaws/actions" + "/workflows/main.yml"}]}, {p,[], ["A mailing list exists at: ", {a,[{href,"https://lists.sourceforge.net/lists/listinfo/"