From a3bd569218cad3bdb10a9f3f5fd4f12e8e57c5fd Mon Sep 17 00:00:00 2001 From: ilyamak04 Date: Mon, 27 Jan 2025 16:40:49 +0300 Subject: [PATCH] one more test --- .gitea/workflows/build-site.yml | 29 ++++++++++++++ docs/index.md | 3 ++ mkdocs.yml | 68 +++++++++++++++++++++++++++++++++ requirements.txt | 4 ++ 4 files changed, 104 insertions(+) create mode 100644 .gitea/workflows/build-site.yml create mode 100644 docs/index.md create mode 100644 mkdocs.yml create mode 100644 requirements.txt diff --git a/.gitea/workflows/build-site.yml b/.gitea/workflows/build-site.yml new file mode 100644 index 0000000..9e7b474 --- /dev/null +++ b/.gitea/workflows/build-site.yml @@ -0,0 +1,29 @@ +name: Build MkDocs + +on: + push: + branches: + - master + +jobs: + build-and-deploy: + runs-on: self-hosted + steps: + - name: Clone repository + run: | + git clone --depth 1 --branch master https://git.mcarov.pro/ilyamak04/wiki.git + + - name: Build site + run: | + cd wiki + python3 -m venv venv + source venv/bin/activate + pip install -r requirements.txt + mkdocs build + + - name: Deploy site + run: | + cd wiki + rm -rf /var/www/wiki/* + cp -r site/ /var/www/wiki/site/ + diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..325bd5e --- /dev/null +++ b/docs/index.md @@ -0,0 +1,3 @@ +# DevOps База знаний + +## Здесь я буду хранить свои заметки и интрукции diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 0000000..10000ac --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,68 @@ +site_name: Ilya Makarov knowledge base +site_url: https://wiki.mcarov.pro +copyright: Copyright © 2025 +theme: + name: material + language: ru + favicon: assets/favicon.ico + + icon: + repo: fontawesome/brands/github + +features: + - navigation.indexes + - navigation.instant + - navigation.tabs + - content.code.copy + - content.action.edit + - content.action.view + + palette: + # Palette toggle for light mode + - media: "(prefers-color-scheme: light)" + scheme: default + primary: black + toggle: + icon: material/brightness-7 + name: Switch to dark mode + # Palette toggle for dark mode + - media: "(prefers-color-scheme: dark)" + scheme: slate + primary: black + toggle: + icon: material/brightness-4 + name: Switch to light mode +extra: + generator: false + social: + - icon: fontawesome/brands/github + link: https://git.mcarov.pro/ilyamak04/wiki + +markdown_extensions: + - attr_list + - admonition + - pymdownx.tabbed: + alternate_style: true + slugify: !!python/object/apply:pymdownx.slugs.slugify + kwds: + case: lower + - pymdownx.highlight: + anchor_linenums: true + line_spans: __span + pygments_lang_class: true + - pymdownx.inlinehilite + - pymdownx.snippets + - pymdownx.superfences + - pymdownx.details + - pymdownx.blocks.caption + - toc: + permalink: "#" + slugify: !!python/object/apply:pymdownx.slugs.slugify + kwds: + case: lower + +extra_css: + - stylesheets/extra.css + +plugins: + - glightbox \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..fc89e38 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,4 @@ +mkdocs +mkdocs-glightbox +pymdown-extensions +mkdocs-material