Files
renovate[bot] 183e001d70 chore(deps): update astral-sh/setup-uv action to v10.3.0 (#348)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-10-10 09:15:47 -04:00

89 lines
2.5 KiB
YAML

---
name: Update
permissions: {}
env:
PYTHON_VERSION: '3.14'
on:
pull_request:
push:
branches:
- master
schedule:
- cron: '0 0 * * *' # every day at midnight
workflow_dispatch:
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
jobs:
update:
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Cache
id: cache
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: cache
key: update-${{ github.sha }}
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install uv
uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0
with:
enable-cache: true
- name: Install Python dependencies
run: uv sync --locked --python "${PYTHON_VERSION}" --no-build --no-install-project --no-python-downloads
- name: Update
env:
TWITCH_CLIENT_ID: ${{ secrets.TWITCH_CLIENT_ID }}
TWITCH_CLIENT_SECRET: ${{ secrets.TWITCH_CLIENT_SECRET }}
YOUTUBE_API_KEY: ${{ secrets.YOUTUBE_API_KEY }}
run: |
uv run \
--no-build \
--no-sync \
python -u ./src/update_db.py \
${{ github.event_name == 'pull_request' && '-t' || '' }}
- name: Prepare Artifacts # uploading artifacts will fail if not zipped due to very large quantity of files
shell: bash
run: 7z a build.zip ./gh-pages/* ./gh-pages-template/*
- name: Upload artifact
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: update
path: ${{ github.workspace }}/build.zip
if-no-files-found: error
include-hidden-files: true
retention-days: 1
call-jekyll-build:
needs: update
permissions:
contents: read
uses: LizardByte/LizardByte.github.io/.github/workflows/jekyll-build.yml@master
secrets:
GH_BOT_EMAIL: ${{ secrets.GH_BOT_EMAIL }}
GH_BOT_TOKEN: ${{ secrets.GH_BOT_TOKEN }}
with:
gh_bot_name: ${{ vars.GH_BOT_NAME }}
site_artifact: 'update'
extract_archive: 'build.zip'
target_branch: 'gh-pages'
clean_gh_pages: true