added action to update readme with calendar screenshot #35
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 | |
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 |