diff --git a/.gitignore b/.gitignore index 0443cdf..b531afb 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,9 @@ ## Ignore Visual Studio temporary files, build results, and ## files generated by popular Visual Studio add-ons. +docs/api +docs/_site + # User-specific files *.suo *.user diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a74183b..de98e91 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -186,3 +186,29 @@ extensions-deploy: - if: $CI_COMMIT_TAG =~ /^[a-z]+\/v[0-9.]+/ script: - dotnet nuget push -k $NUGET_APIKEY -s https://api.nuget.org/v3/index.json --skip-duplicate artifacts/*.nupkg || true + + + +publish-docs: + variables: + DOCFX_SOURCE_REPOSITORY_URL: "https://github.com/AM-WD/cloudflare-api" + stage: deploy + tags: + - docker + - lnx + - server + rules: + - if: $CI_COMMIT_TAG != null + before_script: + - apt-get update + - apt-get -y install zip unzip + - dotnet tool install docfx --tool-path /dotnet-tools + script: + # Build the docs + - dotnet build -c Release --nologo + - /dotnet-tools/docfx metadata docs/docfx.json + - /dotnet-tools/docfx build docs/docfx.json + # Deploy the docs + - cd docs/_site + - zip -r ../docs.zip * + - curl --user "$DOCS_DEPLOY_USER:$DOCS_DEPLOY_PASS" -F docs=cloudflare -F dump=@../docs.zip "$DOCS_DEPLOY_URL" \ No newline at end of file diff --git a/docs/articles/getting-started.md b/docs/articles/getting-started.md new file mode 100644 index 0000000..8b3a794 --- /dev/null +++ b/docs/articles/getting-started.md @@ -0,0 +1 @@ +# Getting Started \ No newline at end of file diff --git a/docs/articles/introduction.md b/docs/articles/introduction.md new file mode 100644 index 0000000..f6ecaa6 --- /dev/null +++ b/docs/articles/introduction.md @@ -0,0 +1 @@ +# Introduction \ No newline at end of file diff --git a/docs/articles/toc.yml b/docs/articles/toc.yml new file mode 100644 index 0000000..8691378 --- /dev/null +++ b/docs/articles/toc.yml @@ -0,0 +1,8 @@ +- name: Introduction + href: introduction.md +- name: Getting Started + href: getting-started.md +- name: GitHub + href: https://github.com/AM-WD/cloudflare-api +- name: NuGet + href: https://www.nuget.org/packages?q=AMWD.Net.API.Cloudflare \ No newline at end of file diff --git a/docs/docfx.json b/docs/docfx.json new file mode 100644 index 0000000..4b7fdab --- /dev/null +++ b/docs/docfx.json @@ -0,0 +1,63 @@ +{ + "$schema": "https://raw.githubusercontent.com/dotnet/docfx/main/schemas/docfx.schema.json", + "metadata": [ + { + "src": [ + { + "src": "../", + "files": [ + "src/Cloudflare/bin/Release/netstandard2.0/amwd-cloudflare-core.dll", + "src/Extensions/Cloudflare.Dns/bin/Release/netstandard2.0/amwd-cloudflare-dns.dll", + "src/Extensions/Cloudflare.Zones/bin/Release/netstandard2.0/amwd-cloudflare-zones.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": "API for .NET", + "_appTitle": "Cloudflare API for .NET", + "_appFooter": "© AM.WD — Docs generated using docfx.", + "_appLogoPath": "images/logo.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/cloudflare", + "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..dc2c5e8 Binary files /dev/null and b/docs/images/favicon.ico differ diff --git a/docs/images/logo.png b/docs/images/logo.png new file mode 100644 index 0000000..ef1d4e1 Binary files /dev/null and b/docs/images/logo.png differ diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..a3bd3bb --- /dev/null +++ b/docs/index.md @@ -0,0 +1,22 @@ +--- +_layout: landing +--- + +# Cloudflare API for .NET + + +## NuGet packages + +Here is an overview of the latest packages. + +| Package URL | Version | Short Description | +|-------------|---------|-------------------| +| [AMWD.Net.API.Cloudflare] | ![NuGet Version: Core](https://img.shields.io/nuget/v/AMWD.Net.API.Cloudflare?style=flat-square&logo=nuget) | Core features to access the Cloudflare API. | +| [AMWD.Net.API.Cloudflare.Dns] | ![NuGet Version: DNS](https://img.shields.io/nuget/v/AMWD.Net.API.Cloudflare.Dns?style=flat-square&logo=nuget) | The DNS section of the Cloudflare API. | +| [AMWD.Net.API.Cloudflare.Zones] | ![NuGet Version: Zones](https://img.shields.io/nuget/v/AMWD.Net.API.Cloudflare.Zones?style=flat-square&logo=nuget) | The Domain/Zone Management section of the Cloudflare API. | + + + +[AMWD.Net.API.Cloudflare]: https://www.nuget.org/packages/AMWD.Net.API.Cloudflare +[AMWD.Net.API.Cloudflare.Dns]: https://www.nuget.org/packages/AMWD.Net.API.Cloudflare.Dns +[AMWD.Net.API.Cloudflare.Zones]: https://www.nuget.org/packages/AMWD.Net.API.Cloudflare.Zones 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..b7532c4 --- /dev/null +++ b/docs/toc.yml @@ -0,0 +1,4 @@ +- name: API + href: api/ +- name: Articles + href: articles/