update uv screenshots #1488
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: update uv screenshots | |
on: | |
schedule: | |
# “At 02:30.” | |
- cron: "30 2 * * *" | |
workflow_dispatch: | |
jobs: | |
screenshot: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.PAT }} | |
- name: setup node 20 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
- name: take screenshots | |
run: | | |
npm install puppeteer --no-save | |
node scripts/screenshot.js | |
- name: update screenshots | |
run: | | |
git config --local user.name "Alfred Pennyworth[bot]" | |
git config --local user.email [email protected] | |
git diff --quiet --name-only src/assets/uv-startseite.png || (git add src/assets/uv-startseite.png; git commit -m "Update uv-startseite.png") | |
git diff --quiet --name-only src/assets/uv-startseite-mobile.png || (git add src/assets/uv-startseite-mobile.png; git commit -m "Update uv-startseite-mobile.png") | |
- name: push screenshot updates | |
uses: ad-m/[email protected] | |
with: | |
github_token: ${{ secrets.PAT }} | |
branch: ${{ github.ref }} |