testing actions #19
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: 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 | |