testing actions #7
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 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: setup chrome driver | |
uses: nanasess/setup-chromedriver@v2 | |
run: | | |
export DISPLAY=:99 | |
chromedriver --url-base=/wd/hub & | |
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & # optional | |
- name: Take Screenshot | |
env: | |
COOKIE: ${{ secrets.COOKIE }} | |
run: | | |
uv run .github/scripts/take_screenshot.py | |
- 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 |