Fix YAML syntax and update DB format in workflow

This commit is contained in:
Mitsuba100
2026-03-23 15:14:58 +01:00
committed by GitHub
parent e0716aaaac
commit 0345f3e8af

View File

@@ -37,9 +37,8 @@ jobs:
cp hyprarch-repo.db.tar.gz hyprarch-repo.db
cp hyprarch-repo.files.tar.gz hyprarch-repo.files
- name: Generate Indices
- name: Generate Subfolder Index
run: |
# 1. Create the BASIC PYTHON-STYLE index for the x86_64 folder
cd x86_64
echo "<html><head><title>Index of /x86_64/</title></head><body style='font-family: monospace;'>" > index.html
echo "<h1>Index of /x86_64/</h1><hr><pre>" >> index.html
@@ -53,40 +52,38 @@ jobs:
done
echo "</pre><hr></body></html>" >> index.html
# 2. Create YOUR SPECIFIC LANDING PAGE for the Root folder
cd ..
cat <<'EOF' > index.html
<!DOCTYPE html>
<html>
<head>
<title>HyprArch Repository</title>
<style>
body { font-family: sans-serif; margin: 40px; line-height: 1.6; background: #2e3440; color: #eceff4; }
a { color: #88c0d0; text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 800px; margin: auto; background: #3b4252; padding: 20px; border-radius: 8px; }
h1 { border-bottom: 2px solid #4c566a; padding-bottom: 10px; }
pre { background: #2e3440; padding: 15px; border-radius: 5px; color: #ebcb8b; }
</style>
</head>
<body>
<div class="container">
<h1>🚀 HyprArch Custom Repository</h1>
<p>To use this repository, add the following to your <code>/etc/pacman.conf</code>:</p>
<pre>[hyprarch-repo]
SigLevel = Optional TrustAll
Server = https://hyprarch-repo.stuple.net/$arch</pre>
- name: Generate Root Landing Page
run: |
echo '<!DOCTYPE html>
<html>
<head>
<title>HyprArch Repository</title>
<style>
body { font-family: sans-serif; margin: 40px; line-height: 1.6; background: #2e3440; color: #eceff4; }
a { color: #88c0d0; text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 800px; margin: auto; background: #3b4252; padding: 20px; border-radius: 8px; }
h1 { border-bottom: 2px solid #4c566a; padding-bottom: 10px; }
pre { background: #2e3440; padding: 15px; border-radius: 5px; color: #ebcb8b; }
</style>
</head>
<body>
<div class="container">
<h1>🚀 HyprArch Custom Repository</h1>
<p>To use this repository, add the following to your <code>/etc/pacman.conf</code>:</p>
<pre>[hyprarch-repo]
SigLevel = Optional TrustAll
Server = https://hyprarch-repo.stuple.net/$arch</pre>
<h2>📦 Available Packages</h2>
<ul>
<li><a href="./x86_64/">Browse x86_64 Packages</a></li>
</ul>
<hr>
<p><small>Automated by GitHub Actions</small></p>
</div>
</body>
</html>
EOF
<h2>📦 Available Packages</h2>
<ul>
<li><a href="./x86_64/">Browse x86_64 Packages</a></li>
</ul>
<hr>
<p><small>Automated by GitHub Actions</small></p>
</div>
</body>
</html>' > index.html
- name: Commit and Push changes
run: |
@@ -94,7 +91,7 @@ EOF
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add .
if ! git diff-index --quiet HEAD; then
git commit -m "Fixed DB format and index indentation"
git commit -m "Fixed YAML syntax and DB format"
git push
else
echo "Nothing to change."