Skip to content
Open
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
23 changes: 22 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1 +1,22 @@
DATABASE_URL=postgres://user:password@ep-cool-project-123456/dbname
# Database Configuration
DATABASE_URL=postgresql://username:password@host:port/database

# Server Configuration
RUST_LOG=info
HOST=0.0.0.0
PORT=3000
JWT_SECRET=your-super-secure-secret

# Supabase Configuration
VITE_SUPABASE_URL=https://your-project.supabase.co
VITE_SUPABASE_ANON_KEY=your-anon-key-here
SUPABASE_SERVICE_ROLE_KEY=your-service-role-key-here # Required for admin auto-provisioning

# Admin Configuration
# The admin account will be automatically created in Supabase on server startup
ADMIN_EMAIL=admin@yourdomain.com
ADMIN_PASSWORD=your-secure-password-here

# Optional: Discord Webhooks
DISCORD_ENABLED=false
DISCORD_WEBHOOK_URL=
16 changes: 10 additions & 6 deletions .github/workflows/worker.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
name: Bi-Weekly Work Generator
name: Work Assignment Generator

# Default to manual/API triggering for efficiency.
# See README.md for scheduling options (external scheduler, cron, etc.)
on:
schedule:
- cron: '0 9 * * *' # Run every day to check eligibility
workflow_dispatch: # Allow manual trigger
workflow_dispatch: # Manual trigger
# Uncomment for daily automated checks (less efficient):
# schedule:
# - cron: '0 9 * * *' # Daily at 9 AM UTC

jobs:
run-generator:
Expand All @@ -28,9 +31,10 @@ jobs:
- name: Build and Run
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
APP__ASSIGNMENT_INTERVAL_DAYS: ${{ secrets.ASSIGNMENT_INTERVAL_DAYS || '14' }}
run: |
# The Rust app itself will handle the "check date" logic.
# It will also set SHOULD_NOTIFY=true/false in GITHUB_ENV.
# The app checks if scheduled interval has passed.
# It sets SHOULD_NOTIFY=true/false in GITHUB_ENV.
cargo run --release > output.txt
cat output.txt

Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@ config/people.toml
.mcp/
logs/
*.log
AI_SESSION_PROMPT.md

# Workspace configuration
.agent/
.env
Loading