From 5631303cc69e76d9e5eb07bd51d6c13201d0a2af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Mon, 12 Jan 2026 20:31:56 +0100 Subject: [PATCH] Added docs --- .gitea/workflows/docs-build.yml | 66 ++++++++++++++++++++++++++++ .gitea/workflows/release-build.yml | 5 ++- docs/docfx.json | 65 +++++++++++++++++++++++++++ docs/images/favicon.ico | Bin 0 -> 15086 bytes docs/images/logo.svg | 1 + docs/index.md | 18 ++++++++ docs/templates/amwd/public/main.css | 3 ++ docs/toc.yml | 6 +++ 8 files changed, 163 insertions(+), 1 deletion(-) create mode 100644 .gitea/workflows/docs-build.yml create mode 100644 docs/docfx.json create mode 100644 docs/images/favicon.ico create mode 100644 docs/images/logo.svg create mode 100644 docs/index.md create mode 100644 docs/templates/amwd/public/main.css create mode 100644 docs/toc.yml diff --git a/.gitea/workflows/docs-build.yml b/.gitea/workflows/docs-build.yml new file mode 100644 index 0000000..8601921 --- /dev/null +++ b/.gitea/workflows/docs-build.yml @@ -0,0 +1,66 @@ +name: Documentation Build + +on: + push: + branches: + - 'main' + +env: + TZ: 'Europe/Berlin' + LANG: 'de' + CONFIGURATION: 'Release' + GITEA_SERVER_URL: ${{ gitea.server_url }} + +jobs: + build-test-deploy: + runs-on: server-runner + defaults: + run: + shell: bash + steps: + - name: Checkout repository code + uses: actions/checkout@v6 + with: + fetch-depth: 0 + + - name: Setup dotnet + uses: actions/setup-dotnet@v5 + with: + dotnet-version: 10.x + cache: false + + - name: Restore dependencies + run: | + set -ex + dotnet restore -v q + echo "CI_SERVER_HOST=${GITEA_SERVER_URL#https://}" >> "$GITEA_ENV" + + - name: Setup tools + run: | + set -ex + dotnet tool install dotnet-reportgenerator-globaltool --tool-path /dotnet-tools + dotnet tool install docfx --tool-path /dotnet-tools + + - name: Build solution + run: | + set -ex + shopt -s globstar + mkdir /artifacts + dotnet build -c ${CONFIGURATION} --no-restore --nologo + mv ./**/*.nupkg /artifacts/ || true + mv ./**/*.snupkg /artifacts/ || true + + - name: Test solution + run: | + set -ex + dotnet test -c ${CONFIGURATION} --no-build --nologo + + - name: Publish documentation + env: + DOCFX_SOURCE_REPOSITORY_URL: 'https://gitea.am-wd.de/am-wd/common' + run: | + set -ex + /dotnet-tools/docfx metadata docs/docfx.json + /dotnet-tools/docfx build docs/docfx.json + tar -C "${{ gitea.workspace }}/docs/_site" -czf "/artifacts/docs.tar.gz" . + curl -sSL --no-progress-meter --user "${{ secrets.DOCS_DEPLOY_USER }}:${{ secrets.DOCS_DEPLOY_PASS }}" -F docs=common -F dump=@/artifacts/docs.tar.gz "${{ vars.DOCS_DEPLOY_URL }}" \ No newline at end of file diff --git a/.gitea/workflows/release-build.yml b/.gitea/workflows/release-build.yml index 5858993..53269ca 100644 --- a/.gitea/workflows/release-build.yml +++ b/.gitea/workflows/release-build.yml @@ -15,6 +15,9 @@ env: jobs: build-test-deploy: runs-on: ubuntu + defaults: + run: + shell: bash steps: - name: Checkout repository code uses: actions/checkout@v6 @@ -58,4 +61,4 @@ jobs: - name: Publish packages run: | set -ex - dotnet nuget push -k "${{ secrets.BAGET_APIKEY }}" -s https://nuget.am-wd.de/v3/index.json --skip-duplicate /artifacts/*.nupkg + dotnet nuget push -k "${{ secrets.BAGET_APIKEY }}" -s https://nuget.am-wd.de/v3/index.json --skip-duplicate /artifacts/*.nupkg \ No newline at end of file diff --git a/docs/docfx.json b/docs/docfx.json new file mode 100644 index 0000000..97a49dd --- /dev/null +++ b/docs/docfx.json @@ -0,0 +1,65 @@ +{ + "$schema": "https://raw.githubusercontent.com/dotnet/docfx/main/schemas/docfx.schema.json", + "metadata": [ + { + "src": [ + { + "src": "../", + "files": [ + "src/AMWD.Common/bin/Release/netstandard2.0/amwd-common.dll", + "src/AMWD.Common.AspNetCore/bin/Release/net8.0/amwd-common-aspnetcore.dll", + "src/AMWD.Common.EntityFrameworkCore/bin/Release/net8.0/amwd-common-efcore.dll", + "src/AMWD.Common.MessagePack/bin/Release/netstandard2.0/amwd-common-msgpack.dll", + "src/AMWD.Common.Test/bin/Release/netstandard2.0/amwd-common-test.dll" + ] + } + ], + "dest": "api", + "outputFormat": "apiPage" + } + ], + "build": { + "content": [ + { + "files": [ "**/*.{md,yml}" ], + "exclude": [ "_site/**", "obj/**" ] + } + ], + "resource": [ + { + "files": [ "images/**" ], + "exclude": [ "_site/**", "obj/**" ] + } + ], + "output": "_site", + "template": [ "default", "modern", "templates/amwd" ], + "postProcessors": ["ExtractSearchIndex"], + "globalMetadata": { + "_appName": "AM.WD Common", + "_appTitle": "A collection of commonly used extensions, etc.", + "_appFooter": "© AM.WD — Docs generated using docfx.", + "_appLogoPath": "images/logo.svg", + "_appFaviconPath": "images/favicon.ico", + "_disableBreadcrumb": true, + "_disableContribution": true, + "_enableSearch": true, + "_enableNewTab": true, + "pdf": false + }, + "markdownEngineName": "markdig", + "markdownEngineProperties": { + "alerts": { + "TODO": "alert alert-secondary" + } + }, + "sitemap": { + "baseUrl": "https://docs.am-wd.de/common", + "priority": 0.5, + "changefreq": "weekly" + }, + "noLangKeyword": false, + "keepFileLink": false, + "cleanupCacheHistory": false, + "disableGitFeatures": true + } +} \ No newline at end of file diff --git a/docs/images/favicon.ico b/docs/images/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..d383eacd5b26879f542f2b347c858edadc900e43 GIT binary patch literal 15086 zcmeI3U5Hgx6vwxYVMOUD7$#8@mX%N%fkdT~ql2l~hawgdsR@}Bh(eA?IejSu1BqlQ zMQ?>sKGZ``1w&X5`4G`WgcO&Wr+k?Q9~?$Ht>3wO9oO0SoO{llxp%GuUD&hs*IMhp z)?RC$efGWM+zi*@mM?cgyWE+(oLk|X>+16DPUrrVzD}Wx@0sP?QJHX$%n=s1Lkj)z z=gunm|8KSjdV70kuU)%#nUrl(_DcI8g}U!s#++>K_Vfxa@D4~hFJ)XxR8W}1TzHnX z2eose8y|zC2yf9iGPX^X9c$LC*&zBVO~4)6HH_?5*&%T|S1_M#0q)R_&(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@OOD82Dsw7QG`I3-g}GLS*IR~HWg;W7M|2)9p;vj89tQ(* zgm>)AS8t6z-BDQ$& bf7zTy<({`9H)=z2pW8p9eqj!C;eq!*;^9sq literal 0 HcmV?d00001 diff --git a/docs/images/logo.svg b/docs/images/logo.svg new file mode 100644 index 0000000..70920a1 --- /dev/null +++ b/docs/images/logo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..c4d64ab --- /dev/null +++ b/docs/index.md @@ -0,0 +1,18 @@ +--- +_layout: landing +--- + +# AM.WD Common + +Over many years, I copied many lines of code over and over again. +So I deciced it was time to change something! + +I started my own NuGet package and it grew over time. + +Now I have my own packages with many extensions and "improvements" for my everyday use. + +![https://nuget.am-wd.de/packages/amwd.common/](https://docs.am-wd.de/nuget.php?package=AMWD.Common) +![https://nuget.am-wd.de/packages/amwd.common.aspnetcore/](https://docs.am-wd.de/nuget.php?package=AMWD.Common.AspNetCore) +![https://nuget.am-wd.de/packages/amwd.common.entityframeworkcore/](https://docs.am-wd.de/nuget.php?package=AMWD.Common.EntityFrameworkCore) +![https://nuget.am-wd.de/packages/amwd.common.messagepack/](https://docs.am-wd.de/nuget.php?package=AMWD.Common.MessagePack) +![https://nuget.am-wd.de/packages/amwd.common.test/](https://docs.am-wd.de/nuget.php?package=AMWD.Common.Test) \ No newline at end of file diff --git a/docs/templates/amwd/public/main.css b/docs/templates/amwd/public/main.css new file mode 100644 index 0000000..057f8d0 --- /dev/null +++ b/docs/templates/amwd/public/main.css @@ -0,0 +1,3 @@ +#logo { + margin-right: 8px; +} \ No newline at end of file diff --git a/docs/toc.yml b/docs/toc.yml new file mode 100644 index 0000000..02dd0a3 --- /dev/null +++ b/docs/toc.yml @@ -0,0 +1,6 @@ +- name: API + href: api/ +- name: Git + href: https://gitea.am-wd.de/am-wd/common +- name: NuGet + href: https://nuget.am-wd.de/?q=AMWD.Common