diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 8461df61..e6807ff4 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -247,6 +247,18 @@ jobs: EOF rm -f /tmp/klz-cables.env + - name: šŸŽØ Branding Setup + if: success() + env: + DIRECTUS_URL: ${{ env.DIRECTUS_URL }} + run: | + echo "šŸŽØ Applying KLZ Branding to $TARGET..." + # Load the locally generated env but use the server URL + NEXT_PUBLIC_BASE_URL="${{ env.NEXT_PUBLIC_BASE_URL }}" \ + DIRECTUS_ADMIN_EMAIL="${{ secrets.DIRECTUS_ADMIN_EMAIL }}" \ + DIRECTUS_ADMIN_PASSWORD="${{ secrets.DIRECTUS_ADMIN_PASSWORD }}" \ + npx tsx scripts/setup-directus-branding.ts + # ────────────────────────────────────────────────────────────────────────────── # JOB 5: Notifications # ────────────────────────────────────────────────────────────────────────────── diff --git a/.gitignore b/.gitignore index 1380c2e7..16cbbf11 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,7 @@ node_modules -.next \ No newline at end of file +.next +.DS_Store + +# Directus +directus/uploads +!directus/extensions/ \ No newline at end of file diff --git a/package.json b/package.json index 155c4d3d..7297454f 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,7 @@ "name": "klz-cables-nextjs", "private": true, "scripts": { - "dev": "docker network create infra 2>/dev/null || true && echo '\\nšŸš€ Development Environment Starting...\\n\\nšŸ“± App: http://klz.localhost\\nšŸ—„ļø CMS: http://cms.klz.localhost/admin\\n🚦 Traefik: http://localhost:8080\\n\\n(Press Ctrl+C to stop)\\n' && docker-compose down --remove-orphans && docker-compose up", + "dev": "docker network create infra 2>/dev/null || true && echo '\\nšŸš€ Development Environment Starting...\\n\\nšŸ“± App: http://klz.localhost\\nšŸ—„ļø CMS: http://cms.klz.localhost/admin\\n🚦 Traefik: http://localhost:8080\\n\\n(Press Ctrl+C to stop)\\n' && docker-compose down --remove-orphans && (docker-compose up & sleep 20 && npm run bootstrap:cms & wait)", "dev:local": "next dev", "build": "next build", "start": "next start", @@ -66,6 +66,7 @@ "typecheck": "tsc --noEmit", "test": "vitest run --passWithNoTests", "test:og": "vitest run tests/og-image.test.ts", + "bootstrap:cms": "DIRECTUS_URL=http://localhost:8055 npx tsx --env-file=.env scripts/setup-directus-branding.ts", "pdf:datasheets": "tsx ./scripts/generate-pdf-datasheets.ts", "pdf:datasheets:legacy": "tsx ./scripts/generate-pdf-datasheets-pdf-lib.ts" },