37 lines
1.1 KiB
YAML
37 lines
1.1 KiB
YAML
name: Build renameable item readme
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*"
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.11"
|
|
|
|
- name: Install Python renderer dependencies
|
|
run: python -m pip install pillow
|
|
|
|
- name: Build readme
|
|
run: python build/scripts/build_readme.py --pack-root . --output-dir build --copy-renders
|
|
|
|
- name: Render model previews
|
|
run: python build/scripts/render_client_items.py --manifest build/renameable-items.json --pack-root . --output-dir build
|
|
|
|
- name: Commit generated readme and renders
|
|
run: |
|
|
git config user.name "Gitea Actions"
|
|
git config user.email "actions@gitea.local"
|
|
git add -f README.md build/renameable-items.json build/renameable-items-*.md build/renders
|
|
if ! git diff --cached --quiet; then
|
|
git commit -m "Update generated readme and renders"
|
|
git push origin HEAD:main
|
|
fi |