diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml
deleted file mode 100644
index cf35a2e..0000000
--- a/.gitea/workflows/deploy.yaml
+++ /dev/null
@@ -1,34 +0,0 @@
-name: Deploy Pages
-
-on:
- push:
- branches: [main]
-
-jobs:
- deploy:
- runs-on: ubuntu-latest # метка твоего runner'а
- steps:
- - name: Checkout
- uses: actions/checkout@v4
-
- - name: Setup Node
- uses: actions/setup-node@v4
- with:
- node-version: 22
- cache: npm
-
- - name: Build
- run: |
- npm ci
- npm run build
-
- - name: Deploy to /var/www/pages
- run: |
- if ! command -v rsync &> /dev/null; then
- sudo apt-get update && sudo apt-get install -y rsync
- fi
-
- TARGET="/var/www/pages/${{ gitea.repository }}"
- mkdir -p "$TARGET"
-
- rsync -a --delete dist/ "$TARGET/"
diff --git a/astro.config.mjs b/astro.config.mjs
index 60a8cdd..e048d6a 100644
--- a/astro.config.mjs
+++ b/astro.config.mjs
@@ -1,4 +1,10 @@
// @ts-check
+import { loadEnv } from 'vite'
import { defineConfig } from 'astro/config'
-export default defineConfig({})
+const mode = process.argv.includes('build') ? 'production' : 'development'
+const env = loadEnv(mode, process.cwd(), '')
+
+export default defineConfig({
+ base: env.PUBLIC_BASE_PATH || '/',
+})
diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro
index 31ab507..4c9b39f 100644
--- a/src/layouts/Layout.astro
+++ b/src/layouts/Layout.astro
@@ -7,6 +7,9 @@ interface Props {
}
const { title, description } = Astro.props
+
+const base = import.meta.env.BASE_URL.replace(/\/+$/, '')
+const faviconHref = `${base}/favicon.svg`
---
@@ -17,7 +20,7 @@ const { title, description } = Astro.props
-
+