-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
093391b
commit 9795277
Showing
3 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import os | ||
|
||
cookie = os.environ['COOKIE'] | ||
|
||
print(f'cookie: {cookie:10}') | ||
|
||
print('taking screenshot') |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
print('updating readme') |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Update Screenshot in README | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
update-readme: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Python and Playwright | ||
run: | | ||
pip install uv | ||
uvx playwright install | ||
- name: Take Screenshot | ||
env: | ||
COOKIE: ${{ secrets.COOKIE }} | ||
run: | | ||
uv run take_screenshot.py | ||
- name: Update README | ||
run: | | ||
uv run 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 |