Skip to content

Commit c07ea7c

Browse files
author
Denis Jelovina
committed
Improve artifact handling in deployment workflow with warnings for missing files
1 parent 9701c35 commit c07ea7c

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

.github/workflows/static.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,20 @@ jobs:
8181
run: |
8282
mkdir public
8383
# Move assets to public/
84-
mv artifacts/pdf-output/main.pdf public/
85-
mv artifacts/html-output public/main-html
84+
# Move PDF if present
85+
if [ -f artifacts/pdf-output/main.pdf ]; then
86+
mv artifacts/pdf-output/main.pdf public/
87+
else
88+
echo "Warning: PDF artifact not found at artifacts/pdf-output/main.pdf"
89+
fi
90+
# Move HTML artifact — downloaded artifact may contain a nested 'main-html' dir
91+
if [ -d artifacts/html-output/main-html ]; then
92+
mv artifacts/html-output/main-html public/
93+
elif [ -d artifacts/html-output ]; then
94+
mv artifacts/html-output public/main-html
95+
else
96+
echo "Warning: HTML artifact not found in artifacts/html-output"
97+
fi
8698
# Create a simple index page
8799
echo '<html><head><title>ALP Tutorial Artifacts</title></head><body>' > public/index.html
88100
echo '<h1>ALP Tutorial Artifacts</h1><ul>' >> public/index.html

0 commit comments

Comments
 (0)