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