Skip to content

Commit f0bbcfa

Browse files
committed
[TASK] Move Readme.html to Index.html if not Index is found
Resolves TYPO3-Documentation/render-guides#938
1 parent 3435712 commit f0bbcfa

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

.github/workflows/main-rendering.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,24 @@ jobs:
7171
fi
7272
fi
7373
74+
- name: Insert redirecting Index.html in folders missing one
75+
shell: bash
76+
run: |
77+
find result -type d | while read dir; do
78+
if [ ! -f "$dir/Index.html" ]; then
79+
echo "Creating Index.html in $dir"
80+
echo '<!DOCTYPE html>' > "$dir/Index.html"
81+
echo '<html>' >> "$dir/Index.html"
82+
echo ' <head>' >> "$dir/Index.html"
83+
echo ' <meta http-equiv="refresh" content="0; url=../Index.html">' >> "$dir/Index.html"
84+
echo ' </head>' >> "Index/index.html"
85+
echo ' <body>' >> "$dir/Index.html"
86+
echo ' <p>If you are not redirected, <a href="../Index.html">click here</a>.</p>' >> "$dir/Index.html"
87+
echo ' </body>' >> "$dir/Index.html"
88+
echo '</html>' >> "$dir/Index.html"
89+
fi
90+
done
91+
7492
- name: Upload Documentation
7593
uses: appleboy/scp-action@master
7694
with:

0 commit comments

Comments
 (0)