generated from osc/skins-template
Update .gitea/workflows/ci.yml
All checks were successful
CI/CD Pipeline / Full CI/CD Pipeline (push) Successful in 10s
All checks were successful
CI/CD Pipeline / Full CI/CD Pipeline (push) Successful in 10s
This commit is contained in:
@@ -730,6 +730,9 @@ jobs:
|
|||||||
- name: Generate Per-Skin Pages
|
- name: Generate Per-Skin Pages
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
set -x # Print each command before executing it
|
||||||
|
|
||||||
echo "Generating detailed per-skin markdown pages…"
|
echo "Generating detailed per-skin markdown pages…"
|
||||||
|
|
||||||
sanitize_filename() {
|
sanitize_filename() {
|
||||||
@@ -750,36 +753,48 @@ jobs:
|
|||||||
echo "$encoded"
|
echo "$encoded"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
echo "Checking DOC_DIR: $DOC_DIR"
|
||||||
mkdir -p "$DOC_DIR"
|
mkdir -p "$DOC_DIR"
|
||||||
|
|
||||||
|
echo "Processing skins in directory: $DANSER_SKINS_DIR"
|
||||||
for dir in "$DANSER_SKINS_DIR"/*; do
|
for dir in "$DANSER_SKINS_DIR"/*; do
|
||||||
[ -d "$dir" ] || continue
|
echo "Examining $dir"
|
||||||
|
[ -d "$dir" ] || { echo "Skipping non-directory $dir"; continue; }
|
||||||
|
|
||||||
skin=$(basename "$dir")
|
skin=$(basename "$dir")
|
||||||
ini_file=$(find "$dir" -maxdepth 1 -iname "skin.ini" | head -n1)
|
ini_file=$(find "$dir" -maxdepth 1 -iname "skin.ini" | head -n1 || true)
|
||||||
skin_header="$skin"
|
skin_header="$skin"
|
||||||
|
|
||||||
|
echo "Found skin: $skin"
|
||||||
if [ -f "$ini_file" ]; then
|
if [ -f "$ini_file" ]; then
|
||||||
line=$(grep -i '^[[:space:]]*Name:' "$ini_file" | head -n1)
|
echo "Found ini file: $ini_file"
|
||||||
[ -n "$line" ] && skin_header=$(sanitize_filename "${line#*:}")
|
line=$(grep -i '^[[:space:]]*Name:' "$ini_file" | head -n1 || true)
|
||||||
|
if [ -n "$line" ]; then
|
||||||
|
skin_header=$(sanitize_filename "${line#*:}")
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "Skin header: $skin_header"
|
||||||
|
|
||||||
raw_path="${skin}/${skin_header}"
|
raw_path="${skin}/${skin_header}"
|
||||||
base_path=$(url_encode_path "$raw_path")
|
base_path=$(url_encode_path "$raw_path")
|
||||||
osk_url="$REGISTRY_URL/$USER_REPOSITORY/media/tag/$new_tag/export/${base_path}.osk"
|
osk_url="$REGISTRY_URL/$USER_REPOSITORY/media/tag/$new_tag/export/${base_path}.osk"
|
||||||
|
|
||||||
md_file_path="${DOC_DIR}/${raw_path}.md"
|
md_file_path="${DOC_DIR}/${raw_path}.md"
|
||||||
mkdir -p "$(dirname "$md_file_path")"
|
|
||||||
|
mkdir -p "$(dirname "$md_file_path")" || { echo "Failed to create directory for $md_file_path"; exit 1; }
|
||||||
|
|
||||||
video_url="$REGISTRY_URL/$USER_REPOSITORY/raw/tag/$new_tag/media/gameplay/${base_path}.mp4"
|
video_url="$REGISTRY_URL/$USER_REPOSITORY/raw/tag/$new_tag/media/gameplay/${base_path}.mp4"
|
||||||
|
|
||||||
echo "# [$skin_header]($osk_url)" > "$md_file_path"
|
{
|
||||||
echo "" >> "$md_file_path"
|
echo "# [$skin_header]($osk_url)"
|
||||||
echo "<video controls autoplay loop muted playsinline src=\"$video_url\" type=\"video/mp4\">" >> "$md_file_path"
|
echo ""
|
||||||
echo "</video>" >> "$md_file_path"
|
echo "<video controls autoplay loop muted playsinline src=\"$video_url\" type=\"video/mp4\">"
|
||||||
echo "" >> "$md_file_path"
|
echo "</video>"
|
||||||
echo "" >> "$md_file_path"
|
echo ""
|
||||||
echo "" >> "$md_file_path"
|
echo ""
|
||||||
echo "" >> "$md_file_path"
|
echo ""
|
||||||
|
echo ""
|
||||||
|
} > "$md_file_path"
|
||||||
|
|
||||||
echo " → Wrote $md_file_path"
|
echo " → Wrote $md_file_path"
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user