Update doc workflow

This commit is contained in:
Christian Treffs 2024-11-01 10:08:44 +01:00
parent ae23509c4a
commit 693acdc032
No known key found for this signature in database
GPG Key ID: 49A4B4B460BE3ED4
1 changed files with 5 additions and 2 deletions

View File

@ -37,9 +37,10 @@ jobs:
run: > run: >
rm -rf docs/.git; rm -rf docs/.git;
rm -rf docs/master; rm -rf docs/master;
git tag -l --sort=-v:refname | grep -e "\d\+\.\d\+.0" | tail -n +6 | xargs -I {} rm -rf {}; git tag -l --sort=-v:refname | grep -e "\d\+\.\d\+.*" | tail -n +6 | xargs -I {} rm -rf {}; // remove all tag folders except the newest 6
for tag in $(echo "master"; git tag -l --sort=-v:refname | grep -e "\d\+\.\d\+.0" | head -6); // iterate the newest 6 tags and master
for tag in $(echo "master"; git tag -l --sort=-v:refname | grep -e "\d\+\.\d\+.*" | head -6);
do do
if [ -d "docs/$tag/data/documentation/firebladeecs" ] if [ -d "docs/$tag/data/documentation/firebladeecs" ]
then then
@ -60,6 +61,8 @@ jobs:
--output-path docs/"$tag" \ --output-path docs/"$tag" \
--transform-for-static-hosting \ --transform-for-static-hosting \
--hosting-base-path ecs/"$tag" \ --hosting-base-path ecs/"$tag" \
--source-service github \
--source-service-base-url https://fireblade-engine.github.io/ecs/"$tag" \
&& echo "✅ Documentation generated for FirebladeECS @ "$tag" release." \ && echo "✅ Documentation generated for FirebladeECS @ "$tag" release." \
|| echo "⚠️ Documentation skipped for FirebladeECS @ "$tag"."; || echo "⚠️ Documentation skipped for FirebladeECS @ "$tag".";
fi; fi;