Skip to content

Commit bba31c6

Browse files
committed
Update root index
1 parent 35e7a01 commit bba31c6

3 files changed

Lines changed: 267 additions & 120 deletions

File tree

.github/workflows/pages.yml

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111

1212
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
1313
permissions:
14-
contents: read
14+
contents: write
1515
pages: write
1616
id-token: write
1717

@@ -30,6 +30,41 @@ jobs:
3030
steps:
3131
- name: Checkout
3232
uses: actions/checkout@v4
33+
34+
- name: Update index.html with version directories
35+
run: |
36+
# Find all version directories (directories with index.html)
37+
VERSION_DIRS=$(find . -maxdepth 2 -name "index.html" -path "./*/index.html" | sed 's|/index.html||' | sed 's|^\./||' | sort -rV)
38+
39+
# Build the version list HTML
40+
VERSION_HTML=""
41+
for dir in $VERSION_DIRS; do
42+
VERSION_HTML="${VERSION_HTML} <li><a href=\"${dir}/index.html\">${dir}</a></li>\n"
43+
done
44+
45+
# Replace the version list in index.html between the markers
46+
sed -i '/<!-- VERSION_LIST_START -->/,/<!-- VERSION_LIST_END -->/{
47+
/<!-- VERSION_LIST_START -->/{
48+
p
49+
r /dev/stdin
50+
}
51+
/<!-- VERSION_LIST_END -->/!d
52+
}' index.html <<< "$(echo -e "$VERSION_HTML")"
53+
54+
echo "Updated index.html with versions: $VERSION_DIRS"
55+
56+
- name: Commit index.html if changed
57+
run: |
58+
git config user.name "github-actions[bot]"
59+
git config user.email "github-actions[bot]@users.noreply.github.com"
60+
if git diff --quiet index.html; then
61+
echo "No changes to index.html"
62+
else
63+
git add index.html
64+
git commit -m "Update index.html with version list"
65+
git push
66+
fi
67+
3368
- name: Setup Pages
3469
uses: actions/configure-pages@v4
3570
- name: Upload artifact

index-older.html

Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2+
<html>
3+
<head>
4+
<title>Available rocks</title>
5+
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
6+
<style>
7+
body {
8+
background-color: white;
9+
font-family: "bitstream vera sans", "verdana", "sans";
10+
font-size: 14px;
11+
}
12+
a {
13+
color: #0000c0;
14+
text-decoration: none;
15+
}
16+
a.pkg {
17+
color: black;
18+
}
19+
a:hover {
20+
text-decoration: underline;
21+
}
22+
td.main {
23+
border-style: none;
24+
}
25+
blockquote {
26+
font-size: 12px;
27+
}
28+
td.package {
29+
background-color: #f0f0f0;
30+
vertical-align: top;
31+
}
32+
td.spacer {
33+
height: 5px;
34+
}
35+
td.version {
36+
background-color: #d0d0d0;
37+
vertical-align: top;
38+
text-align: left;
39+
padding: 5px;
40+
width: 100px;
41+
}
42+
p.manifest {
43+
font-size: 8px;
44+
}
45+
</style>
46+
</head>
47+
<body>
48+
<h1>Available rocks</h1>
49+
<p>
50+
Lua modules available from this location for use with <a href="http://www.luarocks.org">LuaRocks</a>:
51+
</p>
52+
<table class="main">
53+
<td class="package">
54+
<p><a name="fun"></a><a href="#fun" class="pkg"><b>fun</b></a> - <br/>
55+
</p><blockquote><p><br/>
56+
57+
<font size="-1"><a href="">latest sources</a> | License: </font></p>
58+
</blockquote></a></td>
59+
<td class="version">
60+
0.1.3-1:&nbsp;<a href="fun-0.1.3-1.all.rock">all</a><br/></td></tr>
61+
<tr><td colspan="2" class="spacer"></td></tr>
62+
<td class="package">
63+
<p><a name="lsqlite3"></a><a href="#lsqlite3" class="pkg"><b>lsqlite3</b></a> - <br/>
64+
</p><blockquote><p><br/>
65+
66+
<font size="-1"><a href="">latest sources</a> | License: </font></p>
67+
</blockquote></a></td>
68+
<td class="version">
69+
0.9.5-1:&nbsp;<a href="lsqlite3-0.9.5-1.win32-x86.rock">win32-x86</a>,&nbsp;<a href="lsqlite3-0.9.5-1.win32-x86_64.rock">win32-x86_64</a><br/></td></tr>
70+
<tr><td colspan="2" class="spacer"></td></tr>
71+
<td class="package">
72+
<p><a name="lsqlite3complete"></a><a href="#lsqlite3complete" class="pkg"><b>lsqlite3complete</b></a> - <br/>
73+
</p><blockquote><p><br/>
74+
75+
<font size="-1"><a href="">latest sources</a> | License: </font></p>
76+
</blockquote></a></td>
77+
<td class="version">
78+
0.9.5-1:&nbsp;<a href="lsqlite3complete-0.9.5-1.win32-x86.rock">win32-x86</a>,&nbsp;<a href="lsqlite3complete-0.9.5-1.win32-x86_64.rock">win32-x86_64</a><br/></td></tr>
79+
<tr><td colspan="2" class="spacer"></td></tr>
80+
<td class="package">
81+
<p><a name="lua-cjson"></a><a href="#lua-cjson" class="pkg"><b>lua-cjson</b></a> - <br/>
82+
</p><blockquote><p><br/>
83+
84+
<font size="-1"><a href="">latest sources</a> | License: </font></p>
85+
</blockquote></a></td>
86+
<td class="version">
87+
2.1.0.6-1:&nbsp;<a href="lua-cjson-2.1.0.6-1.win32-x86.rock">win32-x86</a>,&nbsp;<a href="lua-cjson-2.1.0.6-1.win32-x86_64.rock">win32-x86_64</a><br/></td></tr>
88+
<tr><td colspan="2" class="spacer"></td></tr>
89+
<td class="package">
90+
<p><a name="luafilesystem"></a><a href="#luafilesystem" class="pkg"><b>luafilesystem</b></a> - <br/>
91+
</p><blockquote><p><br/>
92+
93+
<font size="-1"><a href="">latest sources</a> | License: </font></p>
94+
</blockquote></a></td>
95+
<td class="version">
96+
1.8.0-1:&nbsp;<a href="luafilesystem-1.8.0-1.win32-x86.rock">win32-x86</a>,&nbsp;<a href="luafilesystem-1.8.0-1.win32-x86_64.rock">win32-x86_64</a><br/></td></tr>
97+
<tr><td colspan="2" class="spacer"></td></tr>
98+
<td class="package">
99+
<p><a name="luasec"></a><a href="#luasec" class="pkg"><b>luasec</b></a> - <br/>
100+
</p><blockquote><p><br/>
101+
102+
<font size="-1"><a href="">latest sources</a> | License: </font></p>
103+
</blockquote></a></td>
104+
<td class="version">
105+
1.2.0-1:&nbsp;<a href="luasec-1.2.0-1.win32-x86.rock">win32-x86</a>,&nbsp;<a href="luasec-1.2.0-1.win32-x86_64.rock">win32-x86_64</a><br/></td></tr>
106+
<tr><td colspan="2" class="spacer"></td></tr>
107+
<td class="package">
108+
<p><a name="luasocket"></a><a href="#luasocket" class="pkg"><b>luasocket</b></a> - <br/>
109+
</p><blockquote><p><br/>
110+
111+
<font size="-1"><a href="">latest sources</a> | License: </font></p>
112+
</blockquote></a></td>
113+
<td class="version">
114+
3.1.0-1:&nbsp;<a href="luasocket-3.1.0-1.win32-x86.rock">win32-x86</a>,&nbsp;<a href="luasocket-3.1.0-1.win32-x86_64.rock">win32-x86_64</a><br/></td></tr>
115+
<tr><td colspan="2" class="spacer"></td></tr>
116+
<td class="package">
117+
<p><a name="lyaml"></a><a href="#lyaml" class="pkg"><b>lyaml</b></a> - <br/>
118+
</p><blockquote><p><br/>
119+
120+
<font size="-1"><a href="">latest sources</a> | License: </font></p>
121+
</blockquote></a></td>
122+
<td class="version">
123+
6.2.7-1:&nbsp;<a href="lyaml-6.2.7-1.win32-x86.rock">win32-x86</a>,&nbsp;<a href="lyaml-6.2.7-1.win32-x86_64.rock">win32-x86_64</a><br/></td></tr>
124+
<tr><td colspan="2" class="spacer"></td></tr>
125+
<td class="package">
126+
<p><a name="uuid"></a><a href="#uuid" class="pkg"><b>uuid</b></a> - <br/>
127+
</p><blockquote><p><br/>
128+
129+
<font size="-1"><a href="">latest sources</a> | License: </font></p>
130+
</blockquote></a></td>
131+
<td class="version">
132+
0.3-1:&nbsp;<a href="uuid-0.3-1.all.rock">all</a><br/></td></tr>
133+
<tr><td colspan="2" class="spacer"></td></tr>
134+
</table>
135+
<p class="manifest">
136+
<a href="manifest">manifest file</a>
137+
&bull; <a href="manifest-5.1">Lua 5.1 manifest file</a> (<a href="manifest-5.1.zip">zip</a>)
138+
&bull; <a href="manifest-5.2">Lua 5.2 manifest file</a> (<a href="manifest-5.2.zip">zip</a>)
139+
&bull; <a href="manifest-5.3">Lua 5.3 manifest file</a> (<a href="manifest-5.3.zip">zip</a>)
140+
&bull; <a href="manifest-5.4">Lua 5.4 manifest file</a> (<a href="manifest-5.4.zip">zip</a>)
141+
</p>
142+
</body>
143+
</html>

0 commit comments

Comments
 (0)