diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..5462e83 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,3 @@ +.git +public +.hugo_build.lock diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml new file mode 100644 index 0000000..5c9f949 --- /dev/null +++ b/.gitea/workflows/deploy.yml @@ -0,0 +1,33 @@ +name: Build and Deploy + +on: + push: + branches: [main] + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + submodules: true + + - name: Login to registry + run: | + echo "${{ secrets.GIT_PASS }}" | \ + docker login git.ada-dev.ru -u ${{ secrets.GIT_USER }} --password-stdin + + - name: Build and push + run: | + docker build -t git.ada-dev.ru/${{ gitea.repository }}:latest . + docker push git.ada-dev.ru/${{ gitea.repository }}:latest + + - name: Deploy container + run: | + docker stop ada-dev-ru 2>/dev/null || true + docker rm ada-dev-ru 2>/dev/null || true + docker run -d \ + --name ada-dev-ru \ + --restart unless-stopped \ + -p 8081:80 \ + git.ada-dev.ru/${{ gitea.repository }}:latest diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8dd6d56 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +public/ +.hugo_build.lock diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..7983bb3 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,8 @@ +FROM hugomods/hugo:exts AS builder +WORKDIR /site +COPY . . +RUN hugo --minify + +FROM nginx:alpine +COPY --from=builder /site/public /usr/share/nginx/html +COPY nginx.conf /etc/nginx/conf.d/default.conf diff --git a/archetypes/default.md b/archetypes/default.md new file mode 100644 index 0000000..25b6752 --- /dev/null +++ b/archetypes/default.md @@ -0,0 +1,5 @@ ++++ +date = '{{ .Date }}' +draft = true +title = '{{ replace .File.ContentBaseName "-" " " | title }}' ++++ diff --git a/content/_index.md b/content/_index.md new file mode 100644 index 0000000..70e1383 --- /dev/null +++ b/content/_index.md @@ -0,0 +1,7 @@ ++++ ++++ + +
diff --git a/content/posts/_index.md b/content/posts/_index.md new file mode 100644 index 0000000..7d018e5 --- /dev/null +++ b/content/posts/_index.md @@ -0,0 +1,3 @@ ++++ +title = "Notes" ++++ diff --git a/content/projects/_index.md b/content/projects/_index.md new file mode 100644 index 0000000..5f62ad6 --- /dev/null +++ b/content/projects/_index.md @@ -0,0 +1,3 @@ ++++ +title = "Projects" ++++ diff --git a/content/projects/neural-network.md b/content/projects/neural-network.md new file mode 100644 index 0000000..9643589 --- /dev/null +++ b/content/projects/neural-network.md @@ -0,0 +1,7 @@ ++++ +title = "Hopfield & Hemming Platground" +description = "Визуализация работы сетей Хопфилда и Хэмминга" +tags = ["ruby", "math", "ml"] +externalUrl = "https://projects.ada-dev.ru/neural" +weight = 1 ++++ diff --git a/hugo.toml b/hugo.toml new file mode 100644 index 0000000..6353e09 --- /dev/null +++ b/hugo.toml @@ -0,0 +1,114 @@ +baseURL = 'https://ada-dev.ru/' +locale = 'ru-ru' +title = 'Dmitry Antipenko' +theme = "gokarna" +enableRobotsTXT = true + +[params] + avatarURL = "/images/avatar.webp" + avatarAltText = "Dmitry" + showBackToTopButton = true + + customHeadHTML = """ + + """ + + customFooterHTML = """ + + """ + + socialIcons = [ + {name = "github", url = "https://github.com/ada-dmitry"}, + {name = "telegram", url = "https://t.me/moonlosk"}, + {name = "email", url = "mailto:ada.dmitry@gmail.com"} + ] + +[menu] + [[menu.main]] + identifier = "github" + pre = "" + url = "https://github.com/ada-dmitry" + weight = 3 + [menu.main.params] + NewPage = true + +[markup] + [markup.goldmark.renderer] + unsafe = true + [markup.tableOfContents] + startLevel = 1 + endLevel = 4 + ordered = false + +[minify] + minifyOutput = true diff --git a/layouts/index.html b/layouts/index.html new file mode 100644 index 0000000..9bed66b --- /dev/null +++ b/layouts/index.html @@ -0,0 +1,59 @@ +{{ define "main" }} +{{ .Params.description }}
+ {{ end }} + {{ if .Params.tags }} + + {{ end }} + + {{ end }} +