File tree Expand file tree Collapse file tree 2 files changed +45
-0
lines changed Expand file tree Collapse file tree 2 files changed +45
-0
lines changed Original file line number Diff line number Diff line change 5757 - name : Generate documentation for example project using dotty-sbt
5858 run : ./project/scripts/sbt "sbt-dotty/scripted sbt-dotty/scala3doc"
5959
60+ - name : Generate index file
61+ run : scala3doc/scripts/mk-index.sh scala3doc/output > scala3doc/output/index.html
62+
6063 - name : Upload documentation to server
6164 uses : azure/CLI@v1
6265 env :
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ function print-beginning {
4+ cat << 'EOF '
5+ <html>
6+ <body>
7+ <p> Available projects: </p>
8+ <ul>
9+ EOF
10+ }
11+
12+ function print-list-element {
13+ cat << EOF
14+ <li> <a href="$1 ">$2 </a> </li>
15+ EOF
16+ }
17+
18+ function print-ending {
19+ cat << 'EOF '
20+ </ul>
21+ </body>
22+ </html>
23+ EOF
24+ }
25+
26+ cd " $1 " || exit
27+
28+ print-beginning
29+ for f in *
30+ do
31+ ! [[ -d $f ]] && continue
32+ # assuming that there's only one "root" index file
33+ # if there's a static site, it's at depth 1
34+ # otherwise at depth 2
35+ INDEX=$( find " $f " -maxdepth 1 -name ' index.html' )
36+ if [[ -z $INDEX ]]
37+ then
38+ INDEX=$( find " $f " -maxdepth 2 -name ' index.html' )
39+ fi
40+ print-list-element " $INDEX " " $f "
41+ done
42+ print-ending
You can’t perform that action at this time.
0 commit comments