From c184a79f5e54745e356b240c379d74f8fe9ee4b7 Mon Sep 17 00:00:00 2001 From: Liviu Burcusel Date: Tue, 13 Jan 2026 11:15:05 +0100 Subject: [PATCH] Fixed deploy issue and modified some Forgejo templates --- .forgejo/PULL_REQUEST_TEMPLATE.md | 7 +------ .forgejo/workflows/production-build.yml | 2 ++ .forgejo/workflows/production-pr.yml | 1 + app/pages/auth/create-account.vue | 2 +- app/pages/auth/login.vue | 2 +- app/pages/auth/logout.vue | 2 +- app/pages/index.vue | 2 +- nuxt.config.ts | 2 +- shared/utils/env.ts | 1 + tests/shared/utils/env.test.ts | 2 ++ 10 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.forgejo/PULL_REQUEST_TEMPLATE.md b/.forgejo/PULL_REQUEST_TEMPLATE.md index 628e079..3a11fa0 100644 --- a/.forgejo/PULL_REQUEST_TEMPLATE.md +++ b/.forgejo/PULL_REQUEST_TEMPLATE.md @@ -1,11 +1,6 @@ ## Description -### Proposed Changes - -- -- - ### Checklist before submitting -- [ ] I followed the guidelines in our [Contributing document](https://github.com/lburcusel/glowing-fiesta/blob/production/CONTRIBUTING.md) +- [ ] I followed the guidelines in our [Contributing document](https://git.burcusel.nl/public/glowing-fiesta/blob/production/CONTRIBUTING.md) - [ ] My submission pass all tests diff --git a/.forgejo/workflows/production-build.yml b/.forgejo/workflows/production-build.yml index 9b4e65a..ec3103f 100644 --- a/.forgejo/workflows/production-build.yml +++ b/.forgejo/workflows/production-build.yml @@ -26,6 +26,7 @@ jobs: - name: Install dependencies run: npm ci env: + NUXT_PUBLIC_SITE_URL: ${{ vars.NUXT_PUBLIC_SITE_URL }} DATABASE_URL: "N/A" BETTER_AUTH_SECRET: "N/A" BETTER_AUTH_URL: "N/A" @@ -42,6 +43,7 @@ jobs: - name: Build site env: NITRO_PRESET: node_cluster + NUXT_PUBLIC_SITE_URL: ${{ vars.NUXT_PUBLIC_SITE_URL }} DATABASE_URL: "N/A" BETTER_AUTH_SECRET: "N/A" BETTER_AUTH_URL: "N/A" diff --git a/.forgejo/workflows/production-pr.yml b/.forgejo/workflows/production-pr.yml index 8976c8b..0f2bc01 100644 --- a/.forgejo/workflows/production-pr.yml +++ b/.forgejo/workflows/production-pr.yml @@ -23,6 +23,7 @@ jobs: - name: Install dependencies run: npm ci env: + NUXT_PUBLIC_SITE_URL: ${{ vars.NUXT_PUBLIC_SITE_URL }} DATABASE_URL: "N/A" BETTER_AUTH_SECRET: "N/A" BETTER_AUTH_URL: "N/A" diff --git a/app/pages/auth/create-account.vue b/app/pages/auth/create-account.vue index 76f5286..fa3e634 100644 --- a/app/pages/auth/create-account.vue +++ b/app/pages/auth/create-account.vue @@ -12,7 +12,7 @@ useSeoMeta({ ogTitle: "Glowing Fiesta - Create Account", description: "This is the create account page of a very nice all-purpose application", ogDescription: "This is the create account page of a very nice all-purpose application", - ogImage: config.public.hostUrl + "/images/human.png", + ogImage: config.public.siteUrl + "/images/human.png", }); diff --git a/app/pages/auth/login.vue b/app/pages/auth/login.vue index 9a867e9..6da39d6 100644 --- a/app/pages/auth/login.vue +++ b/app/pages/auth/login.vue @@ -12,7 +12,7 @@ useSeoMeta({ ogTitle: "Glowing Fiesta - Login", description: "This is the login page of a very nice all-purpose application", ogDescription: "This is the login page of a very nice all-purpose application", - ogImage: config.public.hostUrl + "/images/human.png", + ogImage: config.public.siteUrl + "/images/human.png", }); diff --git a/app/pages/auth/logout.vue b/app/pages/auth/logout.vue index 3d073f1..d9fa9ce 100644 --- a/app/pages/auth/logout.vue +++ b/app/pages/auth/logout.vue @@ -19,7 +19,7 @@ useSeoMeta({ ogTitle: "Glowing Fiesta - Logout", description: "This is the logout page of a very nice all-purpose application", ogDescription: "This is the logout page of a very nice all-purpose application", - ogImage: config.public.hostUrl + "/images/human.png", + ogImage: config.public.siteUrl + "/images/human.png", }); diff --git a/app/pages/index.vue b/app/pages/index.vue index 76fe845..d86d17f 100644 --- a/app/pages/index.vue +++ b/app/pages/index.vue @@ -21,7 +21,7 @@ useSeoMeta({ ogTitle: "Glowing Fiesta - Homepage", description: "This is the homepage of a very nice all-purpose application", ogDescription: "This is the homepage of a very nice all-purpose application", - ogImage: config.public.hostUrl + "/images/human.png", + ogImage: config.public.siteUrl + "/images/human.png", }); diff --git a/nuxt.config.ts b/nuxt.config.ts index 68ac745..24a442a 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -10,7 +10,7 @@ export default defineNuxtConfig({ compatibilityDate: "2025-07-15", runtimeConfig: { public: { - hostUrl: env.BETTER_AUTH_URL, + siteUrl: env.NUXT_PUBLIC_SITE_URL, appVersion: packageJsonContent.version, }, }, diff --git a/shared/utils/env.ts b/shared/utils/env.ts index 415e67f..1ba61bc 100644 --- a/shared/utils/env.ts +++ b/shared/utils/env.ts @@ -2,6 +2,7 @@ import { z } from "zod"; const EnvSchema = z.object({ NODE_ENV: z.string(), + NUXT_PUBLIC_SITE_URL: z.string(), DATABASE_URL: z.string(), BETTER_AUTH_SECRET: z.string(), BETTER_AUTH_URL: z.string(), diff --git a/tests/shared/utils/env.test.ts b/tests/shared/utils/env.test.ts index a7fcced..e40ad62 100644 --- a/tests/shared/utils/env.test.ts +++ b/tests/shared/utils/env.test.ts @@ -9,6 +9,7 @@ describe("shared/utils/env", () => { vi.resetModules(); process.env = { ...originalEnv }; process.env.NODE_ENV = "test"; + process.env.NUXT_PUBLIC_SITE_URL = "http://localhost:3000"; process.env.DATABASE_URL = "postgres://localhost:5432/db"; process.env.BETTER_AUTH_SECRET = "secret"; process.env.BETTER_AUTH_URL = "http://localhost:3000"; @@ -23,6 +24,7 @@ describe("shared/utils/env", () => { expect(env).toEqual({ NODE_ENV: "test", + NUXT_PUBLIC_SITE_URL: "http://localhost:3000", DATABASE_URL: "postgres://localhost:5432/db", BETTER_AUTH_SECRET: "secret", BETTER_AUTH_URL: "http://localhost:3000", -- 2.49.1