Refresh Volumes #34
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: Dataset Refresh | |
on: | |
schedule: | |
- cron: '0 0 * * 0' # Runs every Sunday at midnight UTC. You can customize the schedule using cron syntax. | |
workflow_dispatch: # This allows manual triggering from the GitHub Actions UI. | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
- uses: pnpm/action-setup@v3 | |
with: | |
version: 8 | |
- name: Install dependencies | |
run: | | |
cd web-scraper | |
pnpm install | |
- name: Refresh datasets | |
run: | | |
cd web-scraper | |
pnpm start | |
- name: Commit and push changes | |
run: | | |
git config --global user.name "Adam Setch" | |
git config --global user.email "[email protected]@example.com" | |
git checkout -b weekly-build | |
git add . | |
git commit -m "Automated dataset refresh - $(date +'%Y-%m-%d')" | |
git push | |
pull-request: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
branch: weekly-build # Change this to the branch name where you want to raise the PR. | |
commit-message: "Automated dataset refresh - $(date +'%Y-%m-%d')" | |
title: "Automated dataset refresh - $(date +'%Y-%m-%d')" | |
body: 'Automated dataset refresh' |