From 36972f33c6a3cab05e9e5c3eb1dd3240d8c3070a Mon Sep 17 00:00:00 2001 From: lpm Date: Tue, 14 Oct 2025 01:00:01 -0400 Subject: [PATCH 1/2] setup pocketbase companion service to serve static assets --- sveltekit/src/lib/config.ts | 1 + sveltekit/src/routes/+page.svelte | 58 +++++++++++++++++++------------ sveltekit/svelte.config.js | 2 +- 3 files changed, 38 insertions(+), 23 deletions(-) create mode 100644 sveltekit/src/lib/config.ts diff --git a/sveltekit/src/lib/config.ts b/sveltekit/src/lib/config.ts new file mode 100644 index 0000000..2902915 --- /dev/null +++ b/sveltekit/src/lib/config.ts @@ -0,0 +1 @@ +export const PB_URL = "https://pb.codefallacy.com" \ No newline at end of file diff --git a/sveltekit/src/routes/+page.svelte b/sveltekit/src/routes/+page.svelte index 32b4b88..b4b7369 100644 --- a/sveltekit/src/routes/+page.svelte +++ b/sveltekit/src/routes/+page.svelte @@ -2,6 +2,10 @@ import codefallacy from '$lib/assets/codefallacy/codefallacy-transparent.svg'; import bmc from '$lib/assets/codefallacy/bmc-button.svg'; import svg from '$lib/assets/codefallacy/youtube.svg'; + import { PB_URL } from '$lib/config'; + import { dev } from '$app/environment'; + + let imageUrl = $state(`${PB_URL}/api/files/pbc_2708086759/d7kkz17s0i5u7ue/cftransparent_r4959gbvx3.png?thumb=300x0`); @@ -10,30 +14,40 @@ -
-
- codefallacy -
-
-

Hello!

-

Currently this site is under construction!

-

In the meantime, Check my Youtube Channel

-
- -
-
- - codefallacy youtube channel - +{#if !dev} +
+
+ codefallacy +
+
+

Hello!

+

Currently this site is under construction!

+

In the meantime, Check my Youtube Channel

-
- - buy-me-a-coffee - +
+
+ + codefallacy youtube channel + +
+ +
+ + buy-me-a-coffee + +
+{:else} + +
+ TODO: LPM Implement design
+ +{/if} + + diff --git a/sveltekit/svelte.config.js b/sveltekit/svelte.config.js index c898311..369bd7e 100644 --- a/sveltekit/svelte.config.js +++ b/sveltekit/svelte.config.js @@ -21,7 +21,7 @@ const config = { 'script-src': [ "'self'", "https://codefallacy.com", "https://www.codefallacy.com" ], 'script-src-elem': [ "'self'", "https://codefallacy.com", "https://www.codefallacy.com" ], 'style-src': [ "'self'", "'unsafe-inline'", "https://codefallacy.com", "https://www.codefallacy.com" ], - 'img-src': [ "'self'", "data:", "https://codefallacy.com", "https://www.codefallacy.com" ], + 'img-src': [ "'self'", "data:", "https://codefallacy.com", "https://www.codefallacy.com", "*.codefallacy.com" ], 'font-src': [ "'self'", "https://codefallacy.com", "https://www.codefallacy.com" ], "base-uri": [ "'self'", "https://codefallacy.com", "https://www.codefallacy.com" ], "form-action": [ "'self'", "https://codefallacy.com", "https://www.codefallacy.com" ], From db853bca2ce759dd0f42996935d212e359f044d7 Mon Sep 17 00:00:00 2001 From: LPM Date: Tue, 14 Oct 2025 01:02:25 -0400 Subject: [PATCH 2/2] Update build-sveltekit.yml --- .github/workflows/build-sveltekit.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-sveltekit.yml b/.github/workflows/build-sveltekit.yml index 736029e..06d1bc1 100644 --- a/.github/workflows/build-sveltekit.yml +++ b/.github/workflows/build-sveltekit.yml @@ -48,4 +48,18 @@ jobs: labels: ${{ steps.meta.outputs.labels }} # "PORT=${{ secrets.SV_PORT }}" # "CAPTCHAKEY=${{ secrets.CAPTCHAKEY }}" - # "PB_URL=${{ secrets.PB_URL }}" \ No newline at end of file + # "PB_URL=${{ secrets.PB_URL }}" + + - name: Trigger Dokploy Deployment + run: | + curl -X 'POST' \ + '${{ secrets.DOKPLOY_WEBHOOK_URL }}' \ + -H 'Content-Type: application/json' \ + -H 'x-github-event: push' \ + -d '{ + "ref": "refs/heads/production", + "head_commit": { + "id": "${{ github.sha }}", + "message": "Deployment from Github Actions" + } + }'