Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 0 additions & 46 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ jobs:
name: Test & Coverage
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: write

steps:
- name: Checkout
Expand Down Expand Up @@ -76,47 +74,3 @@ jobs:
name: coverage-report
path: coverage/
retention-days: 7

# Only update the badge on pushes to main (not on PRs)
- name: Generate coverage badge
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
run: |
node -e "
const fs = require('fs');
const summary = JSON.parse(fs.readFileSync('coverage/coverage-summary.json', 'utf8'));
const pct = summary.total.lines.pct;
const color = pct >= 90 ? '#4c1' : pct >= 75 ? '#dfb317' : '#e05d44';
const label = 'coverage';
const value = pct + '%';
const svg = [
'<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"106\" height=\"20\">',
'<linearGradient id=\"s\" x2=\"0\" y2=\"100%\">',
'<stop offset=\"0\" stop-color=\"#bbb\" stop-opacity=\".1\"/>',
'<stop offset=\"1\" stop-opacity=\".1\"/>',
'</linearGradient>',
'<clipPath id=\"r\"><rect width=\"106\" height=\"20\" rx=\"3\" fill=\"#fff\"/></clipPath>',
'<g clip-path=\"url(#r)\">',
'<rect width=\"62\" height=\"20\" fill=\"#555\"/>',
'<rect x=\"62\" width=\"44\" height=\"20\" fill=\"' + color + '\"/>',
'<rect width=\"106\" height=\"20\" fill=\"url(#s)\"/>',
'</g>',
'<g fill=\"#fff\" text-anchor=\"middle\" font-family=\"DejaVu Sans,Verdana,Geneva,sans-serif\" font-size=\"11\">',
'<text x=\"31\" y=\"15\" fill=\"#010101\" fill-opacity=\".3\">' + label + '</text>',
'<text x=\"31\" y=\"14\">' + label + '</text>',
'<text x=\"83\" y=\"15\" fill=\"#010101\" fill-opacity=\".3\">' + value + '</text>',
'<text x=\"83\" y=\"14\">' + value + '</text>',
'</g>',
'</svg>'
].join('');
fs.writeFileSync('coverage-badge.svg', svg);
console.log('Generated badge: ' + pct + '%');
"

- name: Commit coverage badge
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "chore: update coverage badge [skip ci]"
file_pattern: coverage-badge.svg
commit_user_name: github-actions[bot]
commit_user_email: github-actions[bot]@users.noreply.github.com
21 changes: 10 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ PlotlineAI is a group movie recommendation app. Each participant shares their ta

[![Live Demo](https://img.shields.io/badge/demo-plotline--ai-blue)](https://plotline-ai.vercel.app/)
[![CI](https://github.com/CodeHunt101/plotline-ai/actions/workflows/ci.yml/badge.svg)](https://github.com/CodeHunt101/plotline-ai/actions/workflows/ci.yml)
![Coverage](./coverage-badge.svg)

## Table of Contents

Expand Down Expand Up @@ -350,19 +349,19 @@ Open **Settings → Secrets and variables → Actions** in your GitHub repo and

**Repository secrets** (sensitive credentials):

| Secret | Used by | Where to find it |
| ---------------------- | ------------------------ | --------------------------------------------------- |
| `SUPABASE_DB_URL` | `supabase-keepalive.yml` | Supabase dashboard → Connect → Transaction mode |
| `CLOUDFLARE_API_TOKEN` | `deploy.yml` | Cloudflare dashboard → My Profile → API Tokens |
| `SUPABASE_API_KEY` | `deploy.yml` | Supabase dashboard → Project Settings → Data API |
| `WORKER_SHARED_SECRET` | `deploy.yml` | Must match `SUPABASE_WORKER_SECRET` in `.env.local` |
| Secret | Used by | Where to find it |
| ---------------------- | ------------------------ | ----------------------------------------------- |
| `SUPABASE_DB_URL` | `supabase-keepalive.yml` | Supabase dashboard → Connect → Transaction mode |
| `CLOUDFLARE_API_TOKEN` | `deploy.yml` | Cloudflare dashboard → My Profile → API Tokens |

**Repository variables** (non-sensitive config):

| Variable | Used by | Where to find it |
| ----------------------- | ------------ | ------------------------------------------------ |
| `CLOUDFLARE_ACCOUNT_ID` | `deploy.yml` | Cloudflare dashboard → right-hand sidebar |
| `SUPABASE_URL` | `deploy.yml` | Supabase dashboard → Project Settings → Data API |
| Variable | Used by | Where to find it |
| ----------------------- | ------------ | ----------------------------------------- |
| `CLOUDFLARE_ACCOUNT_ID` | `deploy.yml` | Cloudflare dashboard → right-hand sidebar |

> [!NOTE]
> The Cloudflare Worker runtime secrets (`SUPABASE_URL`, `SUPABASE_API_KEY`, `WORKER_SHARED_SECRET`) are set directly in the **Cloudflare dashboard → Workers → supabase-worker → Settings → Variables and Secrets**. They are not managed through GitHub Actions.

## Project Structure

Expand Down
Loading