Skip to content

Update GitHub Pages Records #2

Update GitHub Pages Records

Update GitHub Pages Records #2

name: Update GitHub Pages Records
on:
schedule:
- cron: "0 0 * * 0" # This runs every Sunday at midnight UTC
workflow_dispatch:
jobs:
update_records:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Python 3.12
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: "3.12"
- name: Install dependencies
run: |
make install
- name: Run the GitHub Pages script
run: |
pipenv run python bin.update_github_pages_config.py
- name: Check for changes
id: changes
run: |
git config user.name "github-actions"
git config user.email "[email protected]"
git diff --exit-code .github_pages || echo "changes" > changed.txt
- name: Create Pull Request
if: steps.changes.outputs.changes == 'changes'
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6.1.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: ":recycle: Update GitHub Pages Records"
title: ":recycle: Update GitHub Pages Records"
body: |
This PR updates the GitHub Pages records based on the latest configuration.
Auto-generated by GitHub Actions.
branch: update-github-pages
delete-branch: true
base: main