-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (40 loc) · 1.5 KB
/
check-github-pages-records.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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