Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate erlyaws.github.io #488

Merged
merged 1 commit into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
-----------------

Expand Down
48 changes: 48 additions & 0 deletions scripts/update-gh-pages
Original file line number Diff line number Diff line change
@@ -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 [email protected]: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
2 changes: 1 addition & 1 deletion www/TAB.inc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<div class="%%index%%"> <a href="index.yaws" id="index" >Top Page</a> </div>
<div class="%%configuration%%"> <a href="configuration.yaws" id="configuration">Build Config and Run</a></div>
<div class="%%dynamic%%"> <a href="dynamic.yaws" id="dynamic" >Dynamic Content</a> </div>
<div class="%%download%%"> <a href="http://yaws.hyber.org/download/" id="download">Download </a> </div>
<div class="%%download%%"> <a href="http://github.com/erlyaws/yaws/releases/" id="download">Download </a> </div>
<div class="%%contact%%"> <a href="contact.yaws" id="contact">Contact </a> </div>
<div class="%%doc%%"> <a href="doc.yaws" id="doc">Documentation</a> </div>
<div class="%%articles%%"> <a href="articles.yaws" id="resources">Articles</a> </div>
Expand Down
12 changes: 7 additions & 5 deletions www/index.yaws
Original file line number Diff line number Diff line change
Expand Up @@ -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."]},


Expand All @@ -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/"
Expand Down