4 Commits

Author SHA1 Message Date
Sergey Filkin 937f014ce0 Use GitHub markdown CSS for generated HTML
Docker / build (push) Successful in 46s
2026-04-30 20:01:59 +03:00
Sergey Filkin e6ff59c75b Fix code block styling and add deploy webhook
Docker / build (push) Successful in 39s
2026-04-30 19:52:19 +03:00
Sergey Filkin 79a4bcb890 Use Gitea-compatible artifact action
Docker / build (push) Successful in 1m30s
2026-04-30 19:18:14 +03:00
Sergey Filkin 62f1ea5d36 Add Gitea Docker build workflow
Docker / build (push) Has been cancelled
2026-04-30 16:21:56 +03:00
21 changed files with 21748 additions and 4392 deletions
+87
View File
@@ -0,0 +1,87 @@
name: Docker
on:
push:
branches:
- main
tags:
- "v*"
workflow_dispatch:
env:
IMAGE_NAME: fsadmin/md-to-html
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Prepare tags
id: meta
shell: sh
run: |
set -eu
if [ -z "${{ vars.REGISTRY }}" ]; then
echo "::error::Set the REGISTRY repository variable to your Gitea registry host."
exit 1
fi
image="${{ vars.REGISTRY }}/${IMAGE_NAME}"
short_sha="$(printf '%s' "${GITHUB_SHA}" | cut -c1-12)"
{
echo "image=${image}"
echo "tags<<EOF"
echo "${image}:${short_sha}"
if [ "${GITHUB_REF}" = "refs/heads/main" ]; then
echo "${image}:latest"
fi
if [ "${GITHUB_REF_TYPE}" = "tag" ]; then
echo "${image}:${GITHUB_REF_NAME}"
fi
echo "EOF"
} >> "${GITHUB_OUTPUT}"
- name: Login to registry
run: |
printf '%s' "${{ secrets.REGISTRY_PASSWORD }}" \
| docker login "${{ vars.REGISTRY }}" \
--username "${{ secrets.REGISTRY_USERNAME }}" \
--password-stdin
- name: Build and push image
env:
DOCKER_BUILDKIT: "1"
run: |
set -eu
tags=""
while IFS= read -r tag; do
tags="${tags} -t ${tag}"
done <<'EOF'
${{ steps.meta.outputs.tags }}
EOF
docker build ${tags} .
while IFS= read -r tag; do
docker push "${tag}"
done <<'EOF'
${{ steps.meta.outputs.tags }}
EOF
- name: Trigger Dokploy deployment
if: github.ref == 'refs/heads/main'
run: |
set -eu
if [ -z "${{ secrets.DOKPLOY_WEBHOOK_URL }}" ]; then
echo "::error::Set the DOKPLOY_WEBHOOK_URL repository secret."
exit 1
fi
curl -fsS -X POST "${{ secrets.DOKPLOY_WEBHOOK_URL }}"
+1 -1
View File
@@ -101,7 +101,7 @@ jobs:
-o "bin/md-to-html-${GOOS}-${GOARCH}" \ -o "bin/md-to-html-${GOOS}-${GOARCH}" \
./cmd/md-to-html ./cmd/md-to-html
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@v3
with: with:
name: md-to-html-${{ matrix.goos }}-${{ matrix.goarch }} name: md-to-html-${{ matrix.goos }}-${{ matrix.goarch }}
path: bin/md-to-html-${{ matrix.goos }}-${{ matrix.goarch }} path: bin/md-to-html-${{ matrix.goos }}-${{ matrix.goarch }}
File diff suppressed because it is too large Load Diff
+1274 -258
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+1274 -258
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+1274 -258
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+1274 -258
View File
File diff suppressed because it is too large Load Diff
+1274 -258
View File
File diff suppressed because it is too large Load Diff
+1 -4
View File
@@ -114,10 +114,7 @@ templ Home() {
</div> </div>
</div> </div>
<div class="flex flex-wrap items-center justify-between gap-3 border-t border-border px-4 py-4"> <div class="flex flex-wrap items-center justify-end gap-3 border-t border-border px-4 py-4">
<p class="text-xs text-muted-foreground">
Конвертация использует публичный <code class="font-mono text-foreground">GitHub API</code>
</p>
<div class="flex items-center gap-2"> <div class="flex items-center gap-2">
<button <button
type="reset" type="reset"
+1 -1
View File
@@ -89,7 +89,7 @@ func Home() templ.Component {
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "<span>Поддерживается CommonMark + GFM</span></p></div></div><div class=\"flex flex-wrap items-center justify-between gap-3 border-t border-border px-4 py-4\"><p class=\"text-xs text-muted-foreground\">Конвертация использует публичный <code class=\"font-mono text-foreground\">GitHub API</code></p><div class=\"flex items-center gap-2\"><button type=\"reset\" class=\"focus-ring inline-flex h-9 items-center justify-center rounded-md border border-border bg-background px-3.5 text-sm font-medium text-foreground transition hover:bg-muted\">Сбросить</button> <button type=\"submit\" class=\"focus-ring inline-flex h-9 items-center justify-center gap-2 rounded-md bg-primary px-4 text-sm font-medium text-primary-foreground transition hover:bg-primary/90\"><span>Конвертировать</span>") templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "<span>Поддерживается CommonMark + GFM</span></p></div></div><div class=\"flex flex-wrap items-center justify-end gap-3 border-t border-border px-4 py-4\"><div class=\"flex items-center gap-2\"><button type=\"reset\" class=\"focus-ring inline-flex h-9 items-center justify-center rounded-md border border-border bg-background px-3.5 text-sm font-medium text-foreground transition hover:bg-muted\">Сбросить</button> <button type=\"submit\" class=\"focus-ring inline-flex h-9 items-center justify-center gap-2 rounded-md bg-primary px-4 text-sm font-medium text-primary-foreground transition hover:bg-primary/90\"><span>Конвертировать</span>")
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
+1274 -258
View File
File diff suppressed because it is too large Load Diff