tinkering with the actions #322
This file contains hidden or 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: Periodic solutions update | |
on: | |
push: | |
schedule: | |
- cron: '0 0 * * *' | |
workflow_dispatch: | |
jobs: | |
download_new_files: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: Install uv | |
uses: astral-sh/setup-uv@v5 | |
with: | |
python-version: '3.11' | |
- name: install dependencies | |
run: | | |
uv pip install -r requirements.txt | |
- name: update | |
env: | |
CW_COOKIE: ${{ secrets.CW_COOKIE }} | |
run: | | |
python main.py | |
- uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
file_pattern: 'output/*.py' | |
branch: master | |
commit_message: Automated update | |
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 venv | |
uv pip install -r requirements.txt | |
- 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: | |
CW_COOKIE: ${{ secrets.CW_COOKIE }} | |
run: | | |
ls -la | |
uv run .github/scripts/take_screenshot.py | |
- name: Commit and Push Changes | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: "Update screenshot in README" | |
file_pattern: screenshots/*.png |