-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (46 loc) · 1.39 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
52
53
54
55
56
name: Update Screenshot in README
on:
push:
branches:
- master
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/
if-no-files-found: error # This will help us know if screenshots weren't created
- name: Update README
run: |
uv run .github/scripts/update_readme.py
#
# - name: Commit and Push Changes
# run: |
# git config user.name "GitHub Actions"
# git config user.email "[email protected]"
# git add README.md screenshot.png
# git commit -m "Update screenshot in README"
# git push