Skip to content

Commit

Permalink
Add (very simple) landing pages for PR preview
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexAxthelm committed Dec 13, 2024
1 parent 50aede3 commit 9c666b3
Showing 1 changed file with 20 additions and 10 deletions.
30 changes: 20 additions & 10 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,29 @@ jobs:
merge-multiple: false
path: extracted_builds

- name: Show files
- name: Generate PR landing page
working-directory: extracted_builds
shell: bash
run: |
ls -laR extracted_builds
# - name: extract tarfiles
# run: |
# for tarfile in *.tar.gz
# do
# tar -xvzf "$tarfile"
# done
echo "<\!DOCTYPE html><html><body>" > index.html
for target_page in $(find -f */index.html)
do
echo "$target_page"
link_text="$( \
echo "$target_page" | \
sed 's/^dashboard-build-//' | \
sed 's/\/index\.html//' \
)"
echo "$link_text"
echo "<a href=\"$target_page\">$link_text</a><br>" >> index.html
done
echo "</body></html>" >> index.html
cat index.html
- run: ls -laR extracted_builds
- name: Show files
run: |
ls -laR extracted_builds
- name: Add nojekyll file
if: github.event.action != 'closed'
Expand Down

0 comments on commit 9c666b3

Please sign in to comment.