-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (32 loc) · 1.16 KB
/
update-screenshots.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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 }}