Skip to content

Commit 3a475ee

Browse files
committed
Remove .claude directory and update documentation
- Remove .claude/ from repository and add to .gitignore - Update GOOGLE_SHEETS_SETUP.md with actual implementation details - Document Salesforce export column format - Add security notes about service account authentication
1 parent c2d9f2b commit 3a475ee

File tree

3 files changed

+59
-67
lines changed

3 files changed

+59
-67
lines changed

.claude/settings.local.json

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

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ _site
44
.jekyll-metadata
55
vendor
66
.DS_Store
7+
.claude/

GOOGLE_SHEETS_SETUP.md

Lines changed: 58 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -4,63 +4,69 @@ This document explains how to set up and use the Google Sheets integration for d
44

55
## Overview
66

7-
The website automatically fetches data from a Google Sheet daily to display currently active workshops with registration information. Active workshops are highlighted in the catalog and sorted to appear first.
7+
The website automatically fetches data from a Google Sheet daily to display currently active workshops with registration information. Active workshops are highlighted in the catalog and sorted to appear first. This integration uses Google Cloud service account authentication for secure access.
88

9-
## Google Sheet Format
9+
## Google Sheet Format (Salesforce Export)
1010

11-
Your Google Sheet should have the following columns:
11+
The system is configured to parse Salesforce event export format with these columns:
1212

1313
| Column | Description | Example |
1414
|--------|-------------|---------|
15-
| title | Workshop title (must match catalog) | Python Fundamentals: Parts 1-3 |
16-
| date | Workshop date (MM/DD/YYYY) | 12/15/2025 |
17-
| time | Workshop time (HH:MM AM/PM) | 2:00 PM |
18-
| registration_url | Link to registration | https://berkeley.zoom.us/meeting/register/... |
19-
| instructor | Instructor name | Jane Doe |
20-
| location | Workshop location | Online |
21-
| description | Optional description | Learn Python basics in this 3-part series |
15+
| evsprk__Event_Title__c | Workshop title | Python Fundamentals: Parts 1-3 |
16+
| evsprk__Start_Date__c | Workshop date (YYYY-MM-DD) | 2025-08-19 |
17+
| evsprk__Stage__c | Workshop status (must be "Active") | Active |
18+
| evsprk__Event_Homepage_Link__c | HTML link with registration URL | `<a href="https://..." target="_blank">Open Event Home Page</a>` |
2219

2320
## Setup Instructions
2421

25-
### 1. Create Your Google Sheet
26-
27-
1. Create a new Google Sheet with the columns listed above
28-
2. Make the sheet publicly readable:
29-
- Click "Share" button
30-
- Click "Change to anyone with the link"
31-
- Set permission to "Viewer"
32-
- Copy the sharing link
33-
34-
### 2. Get Your Sheet ID
35-
36-
From the Google Sheets URL:
37-
```
38-
https://docs.google.com/spreadsheets/d/YOUR_SHEET_ID_HERE/edit#gid=0
39-
```
40-
41-
The Sheet ID is the part between `/d/` and `/edit`.
22+
### 1. Set Up Google Cloud Service Account
23+
24+
1. Go to [Google Cloud Console](https://console.cloud.google.com)
25+
2. Create a new project or select existing
26+
3. Enable Google Sheets API:
27+
- Go to "APIs & Services" → "Library"
28+
- Search for "Google Sheets API"
29+
- Click "Enable"
30+
4. Create Service Account:
31+
- Go to "IAM & Admin" → "Service Accounts"
32+
- Click "+ CREATE SERVICE ACCOUNT"
33+
- Name: `dlab-workshop-reader`
34+
- Create and download JSON key
35+
36+
### 2. Share Your Google Sheet
37+
38+
1. Get the service account email from the JSON key (e.g., `dlab-workshop-reader@project-id.iam.gserviceaccount.com`)
39+
2. Share your Google Sheet with this email as "Viewer"
40+
3. Note your Sheet ID from the URL:
41+
```
42+
https://docs.google.com/spreadsheets/d/YOUR_SHEET_ID_HERE/edit#gid=0
43+
```
4244

4345
### 3. Configure GitHub Repository
4446

4547
1. Go to your repository Settings → Secrets and variables → Actions
46-
2. Add a new repository secret:
47-
- Name: `GOOGLE_SHEET_ID`
48-
- Value: Your Google Sheet ID
48+
2. Add two repository secrets:
49+
- **GOOGLE_SHEET_ID**: Your Google Sheet ID
50+
- **GOOGLE_SERVICE_ACCOUNT_KEY**: The entire JSON key file contents
4951

50-
### 4. Enable GitHub Actions
52+
### 4. Automation Schedule
5153

52-
The workflow will run automatically:
54+
The workflow runs automatically:
5355
- Daily at 8 AM UTC (1 AM PST)
5456
- Can be triggered manually from Actions tab
5557

5658
## How It Works
5759

58-
1. **Data Fetching**: The Python script fetches data from your Google Sheet
59-
2. **Data Processing**: Workshops are parsed and sorted by date
60-
3. **JSON Update**: The `_data/upcoming_workshops.json` file is updated
61-
4. **Website Display**: JavaScript dynamically updates workshop cards to show:
60+
1. **Service Account Authentication**: GitHub Actions uses the service account credentials to securely access your private Google Sheet
61+
2. **Data Fetching**: The Python script fetches data using Google Sheets API
62+
3. **Data Processing**:
63+
- Filters for workshops with `evsprk__Stage__c = "Active"`
64+
- Parses Salesforce date format (YYYY-MM-DD)
65+
- Extracts registration URL from HTML anchor tags
66+
4. **JSON Update**: The `_data/upcoming_workshops.json` file is updated
67+
5. **Website Display**: JavaScript dynamically updates workshop cards to show:
6268
- Green border highlight for active workshops
63-
- "Next session" badge with date
69+
- "Available Now" badge
6470
- Register button linking to registration URL
6571
- Active workshops sorted first in category pages
6672

@@ -87,9 +93,16 @@ A dedicated page (`/available-now`) shows only active workshops with:
8793

8894
### Workshops Not Showing as Active
8995

90-
1. **Check title matching**: Workshop titles in the Google Sheet must exactly match those in `_data/workshops.yml`
91-
2. **Check date format**: Dates must be in MM/DD/YYYY format
92-
3. **Check GitHub Actions**: Ensure the workflow is running successfully
96+
1. **Check column names**: Ensure your sheet has the Salesforce export columns (`evsprk__Event_Title__c`, etc.)
97+
2. **Check workshop status**: Only workshops with `evsprk__Stage__c = "Active"` are included
98+
3. **Check service account sharing**: Verify the sheet is shared with your service account email
99+
4. **Check GitHub Actions logs**: Look for errors in the Actions tab
100+
101+
### Title Matching
102+
103+
The system uses case-insensitive fuzzy matching to connect sheet workshops with catalog entries:
104+
- "PYTHON FUNDAMENTALS: PARTS 1-3" matches "Python Fundamentals: Parts 1-3"
105+
- "R FUNDAMENTALS: PARTS 1-4" matches "R Fundamentals: Parts 1-4"
93106

94107
### Manual Update
95108

@@ -98,8 +111,9 @@ To manually trigger an update:
98111
2. Select "Update Workshop Data from Google Sheets"
99112
3. Click "Run workflow"
100113

101-
## Maintenance
114+
## Security Notes
102115

103-
- The Google Sheet should be updated with new workshop sessions as they're scheduled
104-
- Remove past workshops to keep the sheet clean
105-
- The website automatically updates daily, no manual intervention needed
116+
- The Google Sheet remains private - only accessible by the service account
117+
- Service account has read-only access
118+
- Credentials are stored encrypted in GitHub Secrets
119+
- No sensitive data is exposed in the public repository

0 commit comments

Comments
 (0)