File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ GRANOLA_API_KEY = grn_...
2+
3+ GOOGLE_CLIENT_ID = ...
4+ GOOGLE_CLIENT_SECRET = ...
5+ GOOGLE_REFRESH_TOKEN =
6+
7+ GOOGLE_DRIVE_FOLDER_ID =
8+
9+ # How often to re-sync (e.g. 1h, 30m, 6h)
10+ SYNC_INTERVAL = 1h
Original file line number Diff line number Diff line change 1+ name : Build and push Docker image
2+
3+ on :
4+ push :
5+ branches : [main]
6+ release :
7+ types : [published]
8+
9+ jobs :
10+ build :
11+ runs-on : ubuntu-latest
12+ permissions :
13+ contents : read
14+ packages : write
15+
16+ steps :
17+ - uses : actions/checkout@v4
18+
19+ - name : Set up QEMU
20+ uses : docker/setup-qemu-action@v3
21+
22+ - name : Set up Docker Buildx
23+ uses : docker/setup-buildx-action@v3
24+
25+ - name : Log in to GitHub Container Registry
26+ uses : docker/login-action@v3
27+ with :
28+ registry : ghcr.io
29+ username : ${{ github.actor }}
30+ password : ${{ secrets.GITHUB_TOKEN }}
31+
32+ - name : Build and push
33+ uses : docker/build-push-action@v6
34+ with :
35+ context : .
36+ push : true
37+ platforms : linux/amd64,linux/arm64
38+ tags : |
39+ ghcr.io/dzarlax-ai/granola-drive-sync:latest
40+ ghcr.io/dzarlax-ai/granola-drive-sync:${{ github.sha }}
Original file line number Diff line number Diff line change @@ -19,13 +19,19 @@ A hidden file stored in the root of your Drive folder. It maps each Granola note
1919
2020## Setup
2121
22- ### 1. Google Cloud credentials
22+ ### 1. Granola API key
23+
24+ 1 . Open the Granola app → ** Settings → Integrations → API**
25+ 2 . Generate a new API key
26+ 3 . Copy it into ` .env ` as ` GRANOLA_API_KEY `
27+
28+ ### 3. Google Cloud credentials
2329
24301 . Go to [ Google Cloud Console] ( https://console.cloud.google.com/ ) → ** APIs & Services → Enable APIs** → enable ** Google Drive API**
25312 . ** Credentials → Create Credentials → OAuth 2.0 Client ID → Desktop app** — download the JSON
26323 . Copy ` client_id ` and ` client_secret ` into ` .env `
2733
28- ### 2 . Get a refresh token (one-time, run locally)
34+ ### 4 . Get a refresh token (one-time, run locally)
2935
3036``` bash
3137go build -o granola-sync .
@@ -35,7 +41,7 @@ export $(grep -v '^#' .env | xargs)
3541
3642A browser window will open. After authorizing, copy the printed ` GOOGLE_REFRESH_TOKEN ` into ` .env ` .
3743
38- ### 3 . Configure ` .env `
44+ ### 5 . Configure ` .env `
3945
4046``` env
4147GRANOLA_API_KEY=grn_...
@@ -56,9 +62,11 @@ SYNC_INTERVAL=1h
5662https://drive.google.com/drive/folders/<FOLDER_ID>
5763```
5864
59- ### 4 . Run
65+ ### 6 . Run
6066
6167``` bash
68+ cp .env.example .env # fill in your values
69+ docker compose pull
6270docker compose up -d
6371docker compose logs -f
6472```
Original file line number Diff line number Diff line change 11services :
22 granola-sync :
3- build : .
3+ image : ghcr.io/dzarlax-ai/granola-drive-sync:latest
44 restart : unless-stopped
55 env_file : .env
You can’t perform that action at this time.
0 commit comments