Skip to content

Update index.html

Update index.html #39

name: Build posters.json
on:
push:
branches: [ main, master ]
paths:
- 'Posters/**'
- '.github/workflows/posters-manifest.yml'
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Generate posters.json
run: |
set -e
echo "[]" > posters.json
# Collect poster files
python - << 'PY'
import os, json, sys

Check failure on line 23 in .github/workflows/posters-manifest.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/posters-manifest.yml

Invalid workflow file

You have an error in your yaml syntax on line 23
valid = {'.pdf','.png','.jpg','.jpeg','.webp','.svg'}
out = []
for root, dirs, files in os.walk('Posters'):
for f in files:
ext = os.path.splitext(f)[1].lower()
if ext in valid:
p = os.path.join(root, f).replace('\\','/')
out.append(p)
out.sort(key=str.lower)
with open('posters.json','w', encoding='utf-8') as fh:
json.dump(out, fh, indent=2)
print(f"Wrote {len(out)} entries to posters.json")
PY
- name: Commit posters.json
run: |
if git diff --quiet posters.json; then
echo "No changes in posters.json"
else
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add posters.json
git commit -m "chore: update posters.json [skip ci]"
git push
fi