updated secrets

This commit is contained in:
liyunze 2026-08-31 18:33:23 +08:00
parent 456f4fb0e5
commit d4527d74fd
3 changed files with 8 additions and 5 deletions

View file

@ -14,6 +14,9 @@ jobs:
- name: Build and start containers - name: Build and start containers
run: docker compose up -d --build --remove-orphans run: docker compose up -d --build --remove-orphans
env:
RESEND_API_KEY: ${{ secrets.RESEND_API_KEY }}
RESEND_FROM: ${{ secrets.RESEND_FROM }}
- name: Prune dangling images - name: Prune dangling images
run: docker image prune -f run: docker image prune -f

View file

@ -2,9 +2,9 @@ import { DatabaseSync } from "node:sqlite";
import { mkdirSync } from "node:fs"; import { mkdirSync } from "node:fs";
import { dirname, resolve } from "node:path"; import { dirname, resolve } from "node:path";
import { randomUUID } from "node:crypto"; import { randomUUID } from "node:crypto";
import { DATABASE_PATH } from "$env/static/private"; import { env } from "$env/dynamic/private";
const DB_PATH = resolve(DATABASE_PATH ?? "data/dsec.db"); const DB_PATH = resolve(env.DATABASE_PATH ?? "data/dsec.db");
let db: DatabaseSync | null = null; let db: DatabaseSync | null = null;

View file

@ -1,8 +1,8 @@
import { Resend } from "resend"; import { Resend } from "resend";
import { RESEND_API_KEY, RESEND_FROM } from "$env/static/private"; import { env } from "$env/dynamic/private";
const API_KEY = RESEND_API_KEY; const API_KEY = env.RESEND_API_KEY;
const FROM = RESEND_FROM; const FROM = env.RESEND_FROM;
async function send(email: string, subject: string, text: string): Promise<void> { async function send(email: string, subject: string, text: string): Promise<void> {
if (!API_KEY) { if (!API_KEY) {