mirror of
https://github.com/dsec-hub/dsec-notebook.git
synced 2026-09-22 07:24:27 +00:00
updated secrets
This commit is contained in:
parent
456f4fb0e5
commit
d4527d74fd
3 changed files with 8 additions and 5 deletions
3
.github/workflows/deploy.yml
vendored
3
.github/workflows/deploy.yml
vendored
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue