mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-04-13 12:22:33 -05:00
generate_site.py resolves files on disk for gap analysis. Without large files and data directories, the deployed site showed 148 missing platform files and 207 unsourced core complement files.
81 lines
1.9 KiB
YAML
81 lines
1.9 KiB
YAML
name: Deploy Site
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- "platforms/**"
|
|
- "emulators/**"
|
|
- "wiki/**"
|
|
- "scripts/generate_site.py"
|
|
- "scripts/generate_readme.py"
|
|
- "scripts/verify.py"
|
|
- "scripts/common.py"
|
|
- "database.json"
|
|
- "mkdocs.yml"
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
pages: write
|
|
id-token: write
|
|
|
|
concurrency:
|
|
group: deploy-site
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- uses: actions/setup-python@v6
|
|
with:
|
|
python-version: "3.12"
|
|
|
|
- run: pip install pyyaml mkdocs-material pymdown-extensions
|
|
|
|
- name: Restore large files from release
|
|
run: |
|
|
mkdir -p .cache/large
|
|
gh release download large-files -D .cache/large/ 2>/dev/null || true
|
|
for f in .cache/large/*; do
|
|
[ -f "$f" ] || continue
|
|
name=$(basename "$f")
|
|
target=$(grep "$name" .gitignore | head -1)
|
|
if [ -n "$target" ] && [ ! -f "$target" ]; then
|
|
mkdir -p "$(dirname "$target")"
|
|
cp "$f" "$target"
|
|
echo "Restored: $target"
|
|
fi
|
|
done
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Refresh data directories
|
|
run: python scripts/refresh_data_dirs.py
|
|
continue-on-error: true
|
|
|
|
- name: Generate site
|
|
run: |
|
|
python scripts/generate_site.py
|
|
python scripts/generate_readme.py --db database.json --platforms-dir platforms
|
|
mkdocs build
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-pages-artifact@v4
|
|
with:
|
|
path: site/
|
|
|
|
deploy:
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
environment:
|
|
name: github-pages
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
steps:
|
|
- name: Deploy to GitHub Pages
|
|
id: deployment
|
|
uses: actions/deploy-pages@v4
|