diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..626ffd1 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,33 @@ +name: Deploy to GitHub Pages + +on: + push: + branches: [main] + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout your repository using git + uses: actions/checkout@v6 + - name: Install, build, and upload your site + uses: withastro/action@v6 + env: + BASE_PATH: /lopata + + deploy: + needs: build + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v5 diff --git a/astro.config.mjs b/astro.config.mjs index cdef365..b08d68e 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -2,7 +2,11 @@ import tailwindcss from "@tailwindcss/vite"; import { defineConfig } from "astro/config"; +const base = process.env.BASE_PATH || "/"; + export default defineConfig({ + site: "https://Ku6epXBOCTuK.github.io", + base, vite: { plugins: [tailwindcss()], }, diff --git a/src/components/SiteHeader.astro b/src/components/SiteHeader.astro index 5ad0e3e..3f77685 100644 --- a/src/components/SiteHeader.astro +++ b/src/components/SiteHeader.astro @@ -1,17 +1,21 @@ -
+--- +import { base } from "../lib/paths"; +--- + +
- + Эмблема Трибунала
-

- Архив ДНТ-7 -

+

Архив ДНТ-7

Межгалактическое Дачное Сопротивление

diff --git a/src/layouts/base.astro b/src/layouts/base.astro index e410f79..e0bbde2 100644 --- a/src/layouts/base.astro +++ b/src/layouts/base.astro @@ -1,27 +1,31 @@ --- -import '../styles/globals.css' +import { base } from "../lib/paths"; +import "../styles/globals.css"; interface Props { - title: string - description?: string + title: string; + description?: string; } -const { title, description } = Astro.props as Props +const { title, description } = Astro.props as Props; --- - - + + {title} {description && } - + diff --git a/src/layouts/doc.astro b/src/layouts/doc.astro index 2a315e2..40891c9 100644 --- a/src/layouts/doc.astro +++ b/src/layouts/doc.astro @@ -2,6 +2,7 @@ import Perforation from "../components/Perforation.astro"; import SiteFooter from "../components/SiteFooter.astro"; import SiteHeader from "../components/SiteHeader.astro"; +import { base } from "../lib/paths"; import BaseLayout from "./base.astro"; interface Props { @@ -33,7 +34,7 @@ const code = content.code;
← Вернуться в реестр @@ -44,7 +45,7 @@ const code = content.code;