diff --git a/.gitea/workflows/release-build.yml b/.gitea/workflows/release-build.yml index 9f10513..7c739eb 100644 --- a/.gitea/workflows/release-build.yml +++ b/.gitea/workflows/release-build.yml @@ -58,3 +58,13 @@ jobs: run: | set -ex dotnet nuget push -k "${{ secrets.NUGET_APIKEY }}" -s "https://api.nuget.org/v3/index.json" --skip-duplicate /artifacts/*.nupkg + + - name: Publish documentation + env: + DOCFX_SOURCE_REPOSITORY_URL: 'https://github.com/AM-WD/LinkMobility' + 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=linkmobility -F dump=@/artifacts/docs.tar.gz "${{ vars.DOCS_DEPLOY_URL }}" diff --git a/CHANGELOG.md b/CHANGELOG.md index efd64c7..8ad286d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - `Validation` utility class for specifications as MSISDN +- Docs rendering using DocFX ### Changed diff --git a/docs/docfx.json b/docs/docfx.json new file mode 100644 index 0000000..df8eef4 --- /dev/null +++ b/docs/docfx.json @@ -0,0 +1,61 @@ +{ + "$schema": "https://raw.githubusercontent.com/dotnet/docfx/main/schemas/docfx.schema.json", + "metadata": [ + { + "src": [ + { + "src": "../", + "files": [ + "src/LinkMobility/bin/Release/netstandard2.0/amwd-linkmobility.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": "LINK Mobility REST API for .NET", + "_appTitle": "LINK Mobility REST API for .NET", + "_appFooter": "© AM.WD — Docs generated using docfx.", + "_appLogoPath": "images/icon.png", + "_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/linkmobility", + "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 0000000..a7eeff7 Binary files /dev/null and b/docs/images/favicon.ico differ diff --git a/docs/images/icon.png b/docs/images/icon.png new file mode 100644 index 0000000..a95e56e Binary files /dev/null and b/docs/images/icon.png differ diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..c95c8b0 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,22 @@ +--- +_layout: landing +--- + +# LINK Mobility API + +[LINK Mobility] is a company specialized in customer communication. + +The available channels are SMS, RCS and WhatsApp Business. + +## NuGet packages + +Here is an overview of the latest package. + +| Package URL | Version | Short Description | +|-------------|---------|-------------------| +| [AMWD.Net.Api.LinkMobility] | ![NuGet Version](https://img.shields.io/nuget/v/AMWD.Net.Api.LinkMobility?style=flat-square&logo=nuget) | Package contains the interfaces to handle the API. | + + + +[LINK Mobility]: https://linkmobility.eu +[AMWD.Net.Api.LinkMobility]: https://www.nuget.org/packages/AMWD.Net.Api.LinkMobility diff --git a/docs/templates/amwd/public/main.css b/docs/templates/amwd/public/main.css new file mode 100644 index 0000000..c152c69 --- /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..e9e4b3e --- /dev/null +++ b/docs/toc.yml @@ -0,0 +1,4 @@ +- name: API + href: api/ +- name: GitHub + href: https://github.com/AM-WD/LinkMobility diff --git a/src/LinkMobility/README.md b/src/LinkMobility/README.md index d0984c7..1a0bd52 100644 --- a/src/LinkMobility/README.md +++ b/src/LinkMobility/README.md @@ -12,7 +12,7 @@ In this project the REST API of LINK Mobility will be implemented. --- -Published under MIT License (see [**tl;dr**Legal]) +Published under MIT License (see [choose a license]) [LINK Mobility REST API]: https://developer.linkmobility.eu/ -[**tl;dr**Legal]: https://www.tldrlegal.com/license/mit-license +[choose a license]: https://choosealicense.com/licenses/mit/