Skip to content

Commit d165dda

Browse files
committed
add calendar.ics and generator
1 parent 50430c7 commit d165dda

File tree

6 files changed

+671
-1
lines changed

6 files changed

+671
-1
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Generate Calendar
2+
3+
on:
4+
push:
5+
paths:
6+
- '_data/events.yml'
7+
workflow_dispatch: # Allow manual triggering
8+
9+
jobs:
10+
generate-calendar:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Set up Python
18+
uses: actions/setup-python@v4
19+
with:
20+
python-version: '3.9'
21+
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install -r requirements.txt
26+
27+
- name: Generate calendar
28+
run: python generate_calendar.py
29+
30+
- name: Commit and push if changed
31+
run: |
32+
git config --local user.email "[email protected]"
33+
git config --local user.name "GitHub Action"
34+
git add calendar.ics
35+
git diff --staged --quiet || git commit -m "Update calendar.ics"
36+
git push

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,7 @@ package.json
1212
.jekyll-cache
1313
/vendor/
1414
vendor/
15+
16+
# ignore the python virtual environment
17+
.venv/
18+
__pycache__/

0 commit comments

Comments
 (0)