-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (40 loc) · 1.16 KB
/
update_readme.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Update Screenshot in README
on:
push:
branches:
- master
workflow_dispatch:
jobs:
update-readme:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Install the project
run: uv sync --group actions --all-extras --dev
- name: Install Chrome
uses: browser-actions/setup-chrome@v1
with:
chrome-version: stable
- name: Install Chrome WebDriver
uses: nanasess/setup-chromedriver@v2
- name: Start Chrome Driver
run: |
chromedriver --version
chrome --version
- name: Take Screenshot
env:
COOKIE: ${{ secrets.COOKIE }}
run: |
uv run .github/scripts/take_screenshot.py
- name: Upload screenshot artifact
uses: actions/upload-artifact@v4
with:
name: webpage-screenshots
path: screenshots/
- name: Commit and Push Changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Update screenshot in README"
file_pattern: screenshots/*.png