API Cache Update #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: API Cache Update | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0 * * 1" | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5.0.0 | |
with: | |
python-version: "3.12" | |
- name: Setup Project | |
run: | | |
echo "Venv setup" | |
python -m venv .venv | |
.venv\Scripts\activate | |
echo "Installing dependencies" | |
pip install -e ./ | |
- name: Run Blender Launcher Caching | |
run: | | |
.venv\Scripts\activate | |
echo "Building style" | |
python build_style.py | |
echo "Set Settings" | |
python scripts/set_default_settings.py | |
echo "Building Cache" | |
python source/main.py --build-cache & | |
sleep 240 | |
echo "Updating Cache API files" | |
python scripts/update_cache_api.py | |
- name: Commit Changes | |
run: | | |
git checkout main | |
git config user.name "Blender Launcher" | |
git config user.email "Blender-Launcher[bot]@users.noreply.github.com" | |
git add -A | |
git commit -m "Update cache files" || echo "No changes to commit" | |
- name: Push Changes | |
run: | | |
git push --set-upstream origin main || echo "Push failed" |