전체 설정 순서
- supabase.com 무료 계정 → New Project 생성
- SQL Editor에서 아래 테이블 생성 쿼리 실행
- Project Settings → API 에서 URL과 anon key 복사 → 위에 입력 후 저장
- github.com 무료 계정 → 새 Repository 생성 후 이 프로젝트 파일 업로드
- Repository → Settings → Secrets → Actions 에서 아래 6개 시크릿 등록
- Netlify에서 GitHub Repository 연결 →
hr.imec.com 도메인 설정
Supabase SQL (한 번만 실행)
-- 8개 테이블 생성
create table if not exists imec_employees (id bigint primary key, dept text, name text, email text unique, role text, position text, status text default '재직');
alter table imec_employees add column if not exists position text;
alter table imec_employees add column if not exists status text default '재직';
create table if not exists imec_leaves (id text primary key, type text, start_date text, end_date text, days numeric, reason text, creator text, creator_email text, emergency_contact text, notes text, submitted_at text);
create table if not exists imec_events (id text primary key, type text, date text, end_date text, time text, title text, location text, creator text, creator_email text, companions text, attendees text, attendees_json text, po_number text, order_number text, trip_desc text);
-- 기존 테이블에 새 컬럼 추가 (이미 테이블이 있는 경우)
alter table imec_leaves add column if not exists emergency_contact text;
alter table imec_leaves add column if not exists notes text;
alter table imec_leaves add column if not exists submitted_at text;
alter table imec_events add column if not exists po_number text;
alter table imec_events add column if not exists order_number text;
alter table imec_events add column if not exists trip_desc text;
alter table imec_events add column if not exists trip_area text;
alter table imec_events add column if not exists is_outwork boolean default false;
create table if not exists imec_email_log (id bigserial primary key, event_id text, recipient_email text, sent_at timestamptz default now());
create table if not exists imec_passwords (email text primary key, password text);
create table if not exists imec_annual_leave (year int, email text, granted numeric, primary key (year, email));
create table if not exists imec_holidays (date text primary key, name text);
create table if not exists imec_profiles (email text primary key, phone text, birth text, address text, emergency_name text, emergency_relation text, emergency_phone text);
-- RLS 활성화 (모든 테이블)
alter table imec_employees enable row level security; create policy "allow_all" on imec_employees for all using (true) with check (true);
alter table imec_leaves enable row level security; create policy "allow_all" on imec_leaves for all using (true) with check (true);
alter table imec_events enable row level security; create policy "allow_all" on imec_events for all using (true) with check (true);
alter table imec_email_log enable row level security; create policy "allow_all" on imec_email_log for all using (true) with check (true);
alter table imec_passwords enable row level security; create policy "allow_all" on imec_passwords for all using (true) with check (true);
alter table imec_annual_leave enable row level security; create policy "allow_all" on imec_annual_leave for all using (true) with check (true);
alter table imec_holidays enable row level security; create policy "allow_all" on imec_holidays for all using (true) with check (true);
alter table imec_profiles enable row level security; create policy "allow_all" on imec_profiles for all using (true) with check (true);
GitHub Actions Secrets (6개)
SUPABASE_URL ← Supabase Project URL
SUPABASE_SERVICE_KEY ← Supabase service_role key (비공개)
SMTP_HOST ← smtp.mailplug.co.kr
SMTP_PORT ← 587
SMTP_USER ← 발신 이메일 주소
SMTP_PASS ← 이메일 비밀번호