Skip to content

Commit 675e39f

Browse files
committed
fixing calendar generation
1 parent cd259da commit 675e39f

File tree

3 files changed

+17
-38
lines changed

3 files changed

+17
-38
lines changed

.github/workflows/generate-calendar.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

.github/workflows/jekyll-deploy.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ name: Deploy Jekyll site to Pages
99
on:
1010
# Runs on pushes targeting the default branch
1111
push:
12-
branches: ["main"]
12+
branches: ["main"]
1313

1414
# Allows you to run this workflow manually from the Actions tab
1515
workflow_dispatch:
@@ -43,6 +43,16 @@ jobs:
4343
- name: Setup Pages
4444
id: pages
4545
uses: actions/configure-pages@v5
46+
- name: Set up Python
47+
uses: actions/setup-python@v4
48+
with:
49+
python-version: '3.9'
50+
- name: Install Python dependencies
51+
run: |
52+
python -m pip install --upgrade pip
53+
pip install -r requirements.txt
54+
- name: Generate calendar
55+
run: python generate_calendar.py
4656
- name: Build with Jekyll
4757
# Outputs to the './_site' directory by default
4858
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"

generate_calendar.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,20 @@
66

77
# ---- SETTINGS ----
88
TIMEZONE = "Europe/Berlin" # Change to your time zone, e.g. "America/New_York"
9+
CALENDAR_NAME = "Cloud Native Linz Events"
10+
CALENDAR_DESCRIPTION = "Meetup events for the Cloud Native Linz community"
911

1012
# Load YAML
1113
with open("_data/events.yml", "r") as f:
1214
data = yaml.safe_load(f)
1315

1416
# Prepare calendar
1517
cal = Calendar()
16-
cal.add("prodid", "-//My GitHub Calendar//EN")
18+
cal.add("prodid", "-//Cloud Native Linz Calendar//EN")
1719
cal.add("version", "2.0")
20+
cal.add("x-wr-calname", CALENDAR_NAME) # Calendar name (widely supported)
21+
cal.add("x-wr-caldesc", CALENDAR_DESCRIPTION) # Calendar description
22+
cal.add("name", CALENDAR_NAME) # Standard property for calendar name
1823

1924
tz = pytz.timezone(TIMEZONE)
2025

0 commit comments

Comments
 (0)