Skip to content

Commit 9730ae9

Browse files
committed
Add periodic indexing workflow
1 parent 800e172 commit 9730ae9

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/update-index.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
on:
2+
schedule:
3+
- cron: "31 * * * *"
4+
jobs:
5+
update_index:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- name: fetch pages
9+
uses: actions/checkout@v4
10+
with:
11+
ref: pages
12+
path: pages
13+
- name: checkout main
14+
uses: actions/checkout@v4
15+
with:
16+
path: main
17+
- name: setup python
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: 3.12
21+
- name: Install hatch
22+
run: python -m pip install hatch
23+
- name: Index
24+
run: cd main; python -m hatch run py-wtf index-since --since $(date -d '1hour ago' '+%Y-%m-%d %H:%M:%S') ../pages
25+
- name: commit
26+
run: |
27+
git config user.name "github-actions[bot]"
28+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
29+
git commit -am 'Auto-generated index'
30+
git push

0 commit comments

Comments
 (0)