diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 4cdeebbbc..023bcf089 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -1,117 +1,110 @@ name: "Documentation" on: push: branches: [ main ] workflow_dispatch: env: DOTNET_NOLOGO: true DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true DOTNET_CLI_TELEMETRY_OPTOUT: true jobs: build: runs-on: ubuntu-latest name: Build documentation steps: - name: Checkout repository uses: actions/checkout@v3 with: - path: DisCatSharp token: ${{ secrets.NYUW_TOKEN_GH }} - name: Setup .NET uses: actions/setup-dotnet@v3.0.3 with: dotnet-version: 6.x - name: Restore packages - working-directory: DisCatSharp run: dotnet restore - name: Build library - working-directory: DisCatSharp run: dotnet build -c Release - name: Test library - working-directory: DisCatSharp run: dotnet test -c Release continue-on-error: true - name: Build Docs - working-directory: DisCatSharp shell: pwsh run: ./rebuild-docs.ps1 -DocsPath "./DisCatSharp.Docs" -Output ".." -PackageName "dcs-docs" - name: Upload packed docs uses: actions/upload-artifact@v3 with: name: dcs-docs.zip path: dcs-docs.zip retention-days: 30 - name: Commit and push changes uses: EndBug/add-and-commit@main with: - cwd: DisCatSharp default_author: user_info author_name: NyuwBot author_email: nyuw@aitsys.dev committer_name: NyuwBot committer_email: nyuw@aitsys.dev commit: --signoff message: '[ci skip] Sync docs changes' tag_push: '--force' documentation: runs-on: ubuntu-latest name: Upload documentation needs: build steps: - name: Checkout docs repository uses: actions/checkout@v3 with: repository: Aiko-IT-Systems/DisCatSharp.Docs - path: DisCatSharp.Docs token: ${{ secrets.NYUW_TOKEN_GH }} + - name: Purge old docs + shell: pwsh + run: Get-ChildItem -Exclude .git* | Remove-Item -Recurse -Force - name: Download packed docs uses: actions/download-artifact@v3 with: name: dcs-docs.zip - - name: Purge old docs - working-directory: DisCatSharp.Docs - shell: pwsh - run: Get-ChildItem -Exclude .git* | Remove-Item -Recurse -Force - name: Extract new docs - run: unzip dcs-docs.zip -d DisCatSharp.Docs + run: unzip dcs-docs.zip -d . + - name: Deleze zip + run: rm dcs-docs.zip - name: Delete packed docs uses: geekyeggo/delete-artifact@v2 with: name: dcs-docs.zip - name: Commit and push changes uses: EndBug/add-and-commit@main with: - cwd: DisCatSharp.Docs default_author: user_info author_name: NyuwBot author_email: nyuw@aitsys.dev committer_name: NyuwBot committer_email: nyuw@aitsys.dev commit: --signoff message: 'Docs update for https://github.com/${{github.repository}}/commit/${{github.sha}}' publish-main: runs-on: ubuntu-latest name: Publish documentation on main server needs: documentation steps: - name: Get SSH Agent uses: webfactory/ssh-agent@v0.7.0 with: ssh-private-key: ${{ secrets.AITSYS_SSH }} - name: Publish on server continue-on-error: true run: ssh -o StrictHostKeyChecking=no -T root@80.153.182.68 -f 'cd /var/www/dcs.aitsys.dev/docs && git pull -f && service apache2 restart' publish-backup: runs-on: ubuntu-latest name: Publish documentation on backup server needs: documentation steps: - name: Get SSH Agent uses: webfactory/ssh-agent@v0.7.0 with: ssh-private-key: ${{ secrets.AITSYS_SSH }} - name: Publish on server continue-on-error: true run: ssh -o StrictHostKeyChecking=no -T root@207.180.240.241 -f 'cd /var/www/dcsdocs && git pull -f && service apache2 restart' diff --git a/DisCatSharp.Docs/dcs/plugins/Microsoft.DocAsCode.Build.Common.dll b/DisCatSharp.Docs/dcs/plugins/Microsoft.DocAsCode.Build.Common.dll deleted file mode 100644 index 32bd9729c..000000000 Binary files a/DisCatSharp.Docs/dcs/plugins/Microsoft.DocAsCode.Build.Common.dll and /dev/null differ diff --git a/DisCatSharp.Docs/dcs/plugins/Microsoft.DocAsCode.Build.MemberLevelManagedReference.deps.json b/DisCatSharp.Docs/dcs/plugins/Microsoft.DocAsCode.Build.MemberLevelManagedReference.deps.json deleted file mode 100644 index 0ae74e628..000000000 --- a/DisCatSharp.Docs/dcs/plugins/Microsoft.DocAsCode.Build.MemberLevelManagedReference.deps.json +++ /dev/null @@ -1,465 +0,0 @@ -{ - "runtimeTarget": { - "name": ".NETStandard,Version=v2.0/", - "signature": "" - }, - "compilationOptions": {}, - "targets": { - ".NETStandard,Version=v2.0": {}, - ".NETStandard,Version=v2.0/": { - "Microsoft.DocAsCode.Build.MemberLevelManagedReference/1.0.0": { - "dependencies": { - "Microsoft.DocAsCode.Build.Common": "1.0.0", - "Microsoft.DocAsCode.Common": "1.0.0", - "Microsoft.DocAsCode.DataContracts.ManagedReference": "1.0.0", - "Microsoft.DocAsCode.Plugins": "1.0.0", - "Microsoft.SourceLink.GitHub": "1.1.1", - "NETStandard.Library": "2.0.3", - "System.Collections.Immutable": "6.0.0", - "System.Runtime.CompilerServices.Unsafe": "6.0.0" - }, - "runtime": { - "Microsoft.DocAsCode.Build.MemberLevelManagedReference.dll": {} - } - }, - "HtmlAgilityPack/1.11.43": { - "runtime": { - "lib/netstandard2.0/HtmlAgilityPack.dll": { - "assemblyVersion": "1.11.43.0", - "fileVersion": "1.11.43.0" - } - } - }, - "Microsoft.Build.Tasks.Git/1.1.1": {}, - "Microsoft.CSharp/4.7.0": { - "runtime": { - "lib/netstandard2.0/Microsoft.CSharp.dll": { - "assemblyVersion": "4.0.5.0", - "fileVersion": "4.700.19.56404" - } - } - }, - "Microsoft.NETCore.Platforms/1.1.0": {}, - "Microsoft.SourceLink.Common/1.1.1": {}, - "Microsoft.SourceLink.GitHub/1.1.1": { - "dependencies": { - "Microsoft.Build.Tasks.Git": "1.1.1", - "Microsoft.SourceLink.Common": "1.1.1" - } - }, - "NETStandard.Library/2.0.3": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0" - } - }, - "Newtonsoft.Json/13.0.1": { - "runtime": { - "lib/netstandard2.0/Newtonsoft.Json.dll": { - "assemblyVersion": "13.0.0.0", - "fileVersion": "13.0.1.25517" - } - } - }, - "System.Buffers/4.5.1": { - "runtime": { - "lib/netstandard2.0/System.Buffers.dll": { - "assemblyVersion": "4.0.3.0", - "fileVersion": "4.6.28619.1" - } - } - }, - "System.Collections.Immutable/6.0.0": { - "dependencies": { - "System.Memory": "4.5.4", - "System.Runtime.CompilerServices.Unsafe": "6.0.0" - }, - "runtime": { - "lib/netstandard2.0/System.Collections.Immutable.dll": { - "assemblyVersion": "6.0.0.0", - "fileVersion": "6.0.21.52210" - } - } - }, - "System.Composition/6.0.0": { - "dependencies": { - "System.Composition.AttributedModel": "6.0.0", - "System.Composition.Convention": "6.0.0", - "System.Composition.Hosting": "6.0.0", - "System.Composition.Runtime": "6.0.0", - "System.Composition.TypedParts": "6.0.0" - } - }, - "System.Composition.AttributedModel/6.0.0": { - "runtime": { - "lib/netstandard2.0/System.Composition.AttributedModel.dll": { - "assemblyVersion": "6.0.0.0", - "fileVersion": "6.0.21.52210" - } - } - }, - "System.Composition.Convention/6.0.0": { - "dependencies": { - "System.Composition.AttributedModel": "6.0.0" - }, - "runtime": { - "lib/netstandard2.0/System.Composition.Convention.dll": { - "assemblyVersion": "6.0.0.0", - "fileVersion": "6.0.21.52210" - } - } - }, - "System.Composition.Hosting/6.0.0": { - "dependencies": { - "System.Composition.Runtime": "6.0.0" - }, - "runtime": { - "lib/netstandard2.0/System.Composition.Hosting.dll": { - "assemblyVersion": "6.0.0.0", - "fileVersion": "6.0.21.52210" - } - } - }, - "System.Composition.Runtime/6.0.0": { - "runtime": { - "lib/netstandard2.0/System.Composition.Runtime.dll": { - "assemblyVersion": "6.0.0.0", - "fileVersion": "6.0.21.52210" - } - } - }, - "System.Composition.TypedParts/6.0.0": { - "dependencies": { - "System.Composition.AttributedModel": "6.0.0", - "System.Composition.Hosting": "6.0.0", - "System.Composition.Runtime": "6.0.0" - }, - "runtime": { - "lib/netstandard2.0/System.Composition.TypedParts.dll": { - "assemblyVersion": "6.0.0.0", - "fileVersion": "6.0.21.52210" - } - } - }, - "System.Memory/4.5.4": { - "dependencies": { - "System.Buffers": "4.5.1", - "System.Numerics.Vectors": "4.4.0", - "System.Runtime.CompilerServices.Unsafe": "6.0.0" - }, - "runtime": { - "lib/netstandard2.0/System.Memory.dll": { - "assemblyVersion": "4.0.1.1", - "fileVersion": "4.6.28619.1" - } - } - }, - "System.Numerics.Vectors/4.4.0": { - "runtime": { - "lib/netstandard2.0/System.Numerics.Vectors.dll": { - "assemblyVersion": "4.1.3.0", - "fileVersion": "4.6.25519.3" - } - } - }, - "System.Reflection.Emit.ILGeneration/4.7.0": { - "runtime": { - "lib/netstandard2.0/System.Reflection.Emit.ILGeneration.dll": { - "assemblyVersion": "4.0.0.0", - "fileVersion": "4.700.19.56404" - } - } - }, - "System.Reflection.Emit.Lightweight/4.7.0": { - "dependencies": { - "System.Reflection.Emit.ILGeneration": "4.7.0" - }, - "runtime": { - "lib/netstandard2.0/System.Reflection.Emit.Lightweight.dll": { - "assemblyVersion": "4.0.0.0", - "fileVersion": "4.700.19.56404" - } - } - }, - "System.Runtime.CompilerServices.Unsafe/6.0.0": { - "runtime": { - "lib/netstandard2.0/System.Runtime.CompilerServices.Unsafe.dll": { - "assemblyVersion": "6.0.0.0", - "fileVersion": "6.0.21.52210" - } - } - }, - "YamlDotNet.Signed/5.1.0": { - "runtime": { - "lib/netstandard1.3/YamlDotNet.dll": { - "assemblyVersion": "5.0.0.0", - "fileVersion": "5.1.0.0" - } - } - }, - "Microsoft.DocAsCode.Build.Common/1.0.0": { - "dependencies": { - "HtmlAgilityPack": "1.11.43", - "Microsoft.DocAsCode.Common": "1.0.0", - "Microsoft.DocAsCode.DataContracts.Common": "1.0.0", - "Microsoft.DocAsCode.MarkdownLite": "1.0.0", - "Microsoft.DocAsCode.Plugins": "1.0.0", - "Microsoft.DocAsCode.YamlSerialization": "1.0.0", - "System.Composition": "6.0.0" - }, - "runtime": { - "Microsoft.DocAsCode.Build.Common.dll": {} - } - }, - "Microsoft.DocAsCode.Common/1.0.0": { - "dependencies": { - "Microsoft.DocAsCode.Plugins": "1.0.0", - "Microsoft.DocAsCode.YamlSerialization": "1.0.0" - }, - "runtime": { - "Microsoft.DocAsCode.Common.dll": {} - } - }, - "Microsoft.DocAsCode.DataContracts.Common/1.0.0": { - "dependencies": { - "Microsoft.DocAsCode.Common": "1.0.0" - }, - "runtime": { - "Microsoft.DocAsCode.DataContracts.Common.dll": {} - } - }, - "Microsoft.DocAsCode.DataContracts.ManagedReference/1.0.0": { - "dependencies": { - "Microsoft.DocAsCode.Common": "1.0.0", - "Microsoft.DocAsCode.DataContracts.Common": "1.0.0", - "Microsoft.DocAsCode.YamlSerialization": "1.0.0" - }, - "runtime": { - "Microsoft.DocAsCode.DataContracts.ManagedReference.dll": {} - } - }, - "Microsoft.DocAsCode.MarkdownLite/1.0.0": { - "dependencies": { - "Microsoft.CSharp": "4.7.0", - "System.Collections.Immutable": "6.0.0" - }, - "runtime": { - "Microsoft.DocAsCode.MarkdownLite.dll": {} - } - }, - "Microsoft.DocAsCode.Plugins/1.0.0": { - "dependencies": { - "Newtonsoft.Json": "13.0.1", - "System.Collections.Immutable": "6.0.0" - }, - "runtime": { - "Microsoft.DocAsCode.Plugins.dll": {} - } - }, - "Microsoft.DocAsCode.YamlSerialization/1.0.0": { - "dependencies": { - "System.Reflection.Emit.Lightweight": "4.7.0", - "YamlDotNet.Signed": "5.1.0" - }, - "runtime": { - "Microsoft.DocAsCode.YamlSerialization.dll": {} - } - } - } - }, - "libraries": { - "Microsoft.DocAsCode.Build.MemberLevelManagedReference/1.0.0": { - "type": "project", - "serviceable": false, - "sha512": "" - }, - "HtmlAgilityPack/1.11.43": { - "type": "package", - "serviceable": true, - "sha512": "sha512-C2gpt+S2tdFlQMOC3DK7rHZ8iv6EpDuIo4v0UTUSGX1F1bZ+NAQ3gp77HK8/JfCDszUm3Y2rHoyTp/TpO4KOIA==", - "path": "htmlagilitypack/1.11.43", - "hashPath": "htmlagilitypack.1.11.43.nupkg.sha512" - }, - "Microsoft.Build.Tasks.Git/1.1.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-AT3HlgTjsqHnWpBHSNeR0KxbLZD7bztlZVj7I8vgeYG9SYqbeFGh0TM/KVtC6fg53nrWHl3VfZFvb5BiQFcY6Q==", - "path": "microsoft.build.tasks.git/1.1.1", - "hashPath": "microsoft.build.tasks.git.1.1.1.nupkg.sha512" - }, - "Microsoft.CSharp/4.7.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-pTj+D3uJWyN3My70i2Hqo+OXixq3Os2D1nJ2x92FFo6sk8fYS1m1WLNTs0Dc1uPaViH0YvEEwvzddQ7y4rhXmA==", - "path": "microsoft.csharp/4.7.0", - "hashPath": "microsoft.csharp.4.7.0.nupkg.sha512" - }, - "Microsoft.NETCore.Platforms/1.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==", - "path": "microsoft.netcore.platforms/1.1.0", - "hashPath": "microsoft.netcore.platforms.1.1.0.nupkg.sha512" - }, - "Microsoft.SourceLink.Common/1.1.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-WMcGpWKrmJmzrNeuaEb23bEMnbtR/vLmvZtkAP5qWu7vQsY59GqfRJd65sFpBszbd2k/bQ8cs8eWawQKAabkVg==", - "path": "microsoft.sourcelink.common/1.1.1", - "hashPath": "microsoft.sourcelink.common.1.1.1.nupkg.sha512" - }, - "Microsoft.SourceLink.GitHub/1.1.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-IaJGnOv/M7UQjRJks7B6p7pbPnOwisYGOIzqCz5ilGFTApZ3ktOR+6zJ12ZRPInulBmdAf1SrGdDG2MU8g6XTw==", - "path": "microsoft.sourcelink.github/1.1.1", - "hashPath": "microsoft.sourcelink.github.1.1.1.nupkg.sha512" - }, - "NETStandard.Library/2.0.3": { - "type": "package", - "serviceable": true, - "sha512": "sha512-st47PosZSHrjECdjeIzZQbzivYBJFv6P2nv4cj2ypdI204DO+vZ7l5raGMiX4eXMJ53RfOIg+/s4DHVZ54Nu2A==", - "path": "netstandard.library/2.0.3", - "hashPath": "netstandard.library.2.0.3.nupkg.sha512" - }, - "Newtonsoft.Json/13.0.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A==", - "path": "newtonsoft.json/13.0.1", - "hashPath": "newtonsoft.json.13.0.1.nupkg.sha512" - }, - "System.Buffers/4.5.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-Rw7ijyl1qqRS0YQD/WycNst8hUUMgrMH4FCn1nNm27M4VxchZ1js3fVjQaANHO5f3sN4isvP4a+Met9Y4YomAg==", - "path": "system.buffers/4.5.1", - "hashPath": "system.buffers.4.5.1.nupkg.sha512" - }, - "System.Collections.Immutable/6.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-l4zZJ1WU2hqpQQHXz1rvC3etVZN+2DLmQMO79FhOTZHMn8tDRr+WU287sbomD0BETlmKDn0ygUgVy9k5xkkJdA==", - "path": "system.collections.immutable/6.0.0", - "hashPath": "system.collections.immutable.6.0.0.nupkg.sha512" - }, - "System.Composition/6.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-d7wMuKQtfsxUa7S13tITC8n1cQzewuhD5iDjZtK2prwFfKVzdYtgrTHgjaV03Zq7feGQ5gkP85tJJntXwInsJA==", - "path": "system.composition/6.0.0", - "hashPath": "system.composition.6.0.0.nupkg.sha512" - }, - "System.Composition.AttributedModel/6.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-WK1nSDLByK/4VoC7fkNiFuTVEiperuCN/Hyn+VN30R+W2ijO1d0Z2Qm0ScEl9xkSn1G2MyapJi8xpf4R8WRa/w==", - "path": "system.composition.attributedmodel/6.0.0", - "hashPath": "system.composition.attributedmodel.6.0.0.nupkg.sha512" - }, - "System.Composition.Convention/6.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-XYi4lPRdu5bM4JVJ3/UIHAiG6V6lWWUlkhB9ab4IOq0FrRsp0F4wTyV4Dj+Ds+efoXJ3qbLqlvaUozDO7OLeXA==", - "path": "system.composition.convention/6.0.0", - "hashPath": "system.composition.convention.6.0.0.nupkg.sha512" - }, - "System.Composition.Hosting/6.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-w/wXjj7kvxuHPLdzZ0PAUt++qJl03t7lENmb2Oev0n3zbxyNULbWBlnd5J5WUMMv15kg5o+/TCZFb6lSwfaUUQ==", - "path": "system.composition.hosting/6.0.0", - "hashPath": "system.composition.hosting.6.0.0.nupkg.sha512" - }, - "System.Composition.Runtime/6.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-qkRH/YBaMPTnzxrS5RDk1juvqed4A6HOD/CwRcDGyPpYps1J27waBddiiq1y93jk2ZZ9wuA/kynM+NO0kb3PKg==", - "path": "system.composition.runtime/6.0.0", - "hashPath": "system.composition.runtime.6.0.0.nupkg.sha512" - }, - "System.Composition.TypedParts/6.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-iUR1eHrL8Cwd82neQCJ00MpwNIBs4NZgXzrPqx8NJf/k4+mwBO0XCRmHYJT4OLSwDDqh5nBLJWkz5cROnrGhRA==", - "path": "system.composition.typedparts/6.0.0", - "hashPath": "system.composition.typedparts.6.0.0.nupkg.sha512" - }, - "System.Memory/4.5.4": { - "type": "package", - "serviceable": true, - "sha512": "sha512-1MbJTHS1lZ4bS4FmsJjnuGJOu88ZzTT2rLvrhW7Ygic+pC0NWA+3hgAen0HRdsocuQXCkUTdFn9yHJJhsijDXw==", - "path": "system.memory/4.5.4", - "hashPath": "system.memory.4.5.4.nupkg.sha512" - }, - "System.Numerics.Vectors/4.4.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-UiLzLW+Lw6HLed1Hcg+8jSRttrbuXv7DANVj0DkL9g6EnnzbL75EB7EWsw5uRbhxd/4YdG8li5XizGWepmG3PQ==", - "path": "system.numerics.vectors/4.4.0", - "hashPath": "system.numerics.vectors.4.4.0.nupkg.sha512" - }, - "System.Reflection.Emit.ILGeneration/4.7.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-AucBYo3DSI0IDxdUjKksBcQJXPHyoPyrCXYURW1WDsLI4M65Ar/goSHjdnHOAY9MiYDNKqDlIgaYm+zL2hA1KA==", - "path": "system.reflection.emit.ilgeneration/4.7.0", - "hashPath": "system.reflection.emit.ilgeneration.4.7.0.nupkg.sha512" - }, - "System.Reflection.Emit.Lightweight/4.7.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-a4OLB4IITxAXJeV74MDx49Oq2+PsF6Sml54XAFv+2RyWwtDBcabzoxiiJRhdhx+gaohLh4hEGCLQyBozXoQPqA==", - "path": "system.reflection.emit.lightweight/4.7.0", - "hashPath": "system.reflection.emit.lightweight.4.7.0.nupkg.sha512" - }, - "System.Runtime.CompilerServices.Unsafe/6.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg==", - "path": "system.runtime.compilerservices.unsafe/6.0.0", - "hashPath": "system.runtime.compilerservices.unsafe.6.0.0.nupkg.sha512" - }, - "YamlDotNet.Signed/5.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-3iZF8/sDp/AxnA3YZ3gR+8irfd2FiBsqdR9fywzcpeBdaqUDRncqejAv3+jIwwCoHJz3No6JT7u+NzTeVE+5VA==", - "path": "yamldotnet.signed/5.1.0", - "hashPath": "yamldotnet.signed.5.1.0.nupkg.sha512" - }, - "Microsoft.DocAsCode.Build.Common/1.0.0": { - "type": "project", - "serviceable": false, - "sha512": "" - }, - "Microsoft.DocAsCode.Common/1.0.0": { - "type": "project", - "serviceable": false, - "sha512": "" - }, - "Microsoft.DocAsCode.DataContracts.Common/1.0.0": { - "type": "project", - "serviceable": false, - "sha512": "" - }, - "Microsoft.DocAsCode.DataContracts.ManagedReference/1.0.0": { - "type": "project", - "serviceable": false, - "sha512": "" - }, - "Microsoft.DocAsCode.MarkdownLite/1.0.0": { - "type": "project", - "serviceable": false, - "sha512": "" - }, - "Microsoft.DocAsCode.Plugins/1.0.0": { - "type": "project", - "serviceable": false, - "sha512": "" - }, - "Microsoft.DocAsCode.YamlSerialization/1.0.0": { - "type": "project", - "serviceable": false, - "sha512": "" - } - } -} \ No newline at end of file diff --git a/DisCatSharp.Docs/dcs/plugins/Microsoft.DocAsCode.Build.MemberLevelManagedReference.dll b/DisCatSharp.Docs/dcs/plugins/Microsoft.DocAsCode.Build.MemberLevelManagedReference.dll deleted file mode 100644 index b8140fe5d..000000000 Binary files a/DisCatSharp.Docs/dcs/plugins/Microsoft.DocAsCode.Build.MemberLevelManagedReference.dll and /dev/null differ diff --git a/DisCatSharp.Docs/dcs/plugins/Microsoft.DocAsCode.Common.dll b/DisCatSharp.Docs/dcs/plugins/Microsoft.DocAsCode.Common.dll deleted file mode 100644 index 90c7d1dea..000000000 Binary files a/DisCatSharp.Docs/dcs/plugins/Microsoft.DocAsCode.Common.dll and /dev/null differ diff --git a/DisCatSharp.Docs/dcs/plugins/Microsoft.DocAsCode.DataContracts.Common.dll b/DisCatSharp.Docs/dcs/plugins/Microsoft.DocAsCode.DataContracts.Common.dll deleted file mode 100644 index 54fde4328..000000000 Binary files a/DisCatSharp.Docs/dcs/plugins/Microsoft.DocAsCode.DataContracts.Common.dll and /dev/null differ diff --git a/DisCatSharp.Docs/dcs/plugins/Microsoft.DocAsCode.DataContracts.ManagedReference.dll b/DisCatSharp.Docs/dcs/plugins/Microsoft.DocAsCode.DataContracts.ManagedReference.dll deleted file mode 100644 index c78131afc..000000000 Binary files a/DisCatSharp.Docs/dcs/plugins/Microsoft.DocAsCode.DataContracts.ManagedReference.dll and /dev/null differ diff --git a/DisCatSharp.Docs/dcs/plugins/Microsoft.DocAsCode.MarkdownLite.dll b/DisCatSharp.Docs/dcs/plugins/Microsoft.DocAsCode.MarkdownLite.dll deleted file mode 100644 index 4f70e5a5a..000000000 Binary files a/DisCatSharp.Docs/dcs/plugins/Microsoft.DocAsCode.MarkdownLite.dll and /dev/null differ diff --git a/DisCatSharp.Docs/dcs/plugins/Microsoft.DocAsCode.Plugins.dll b/DisCatSharp.Docs/dcs/plugins/Microsoft.DocAsCode.Plugins.dll deleted file mode 100644 index 1d8b799a0..000000000 Binary files a/DisCatSharp.Docs/dcs/plugins/Microsoft.DocAsCode.Plugins.dll and /dev/null differ diff --git a/DisCatSharp.Docs/dcs/plugins/Microsoft.DocAsCode.YamlSerialization.dll b/DisCatSharp.Docs/dcs/plugins/Microsoft.DocAsCode.YamlSerialization.dll deleted file mode 100644 index 419670fc4..000000000 Binary files a/DisCatSharp.Docs/dcs/plugins/Microsoft.DocAsCode.YamlSerialization.dll and /dev/null differ diff --git a/DisCatSharp.Docs/docfx.json b/DisCatSharp.Docs/docfx.json index dbd238afd..2a0ade058 100644 --- a/DisCatSharp.Docs/docfx.json +++ b/DisCatSharp.Docs/docfx.json @@ -1,301 +1,300 @@ { "metadata":[ { "src":[ { "src":"../DisCatSharp/", "files":[ "**.csproj" ], "exclude":[ "**/obj/**", "**/bin/**" ] } ], "dest":"api/DisCatSharp", "filter":"filter_config.yml", "disableDefaultFilter":false }, { "src":[ { "src":"../DisCatSharp.Interactivity/", "files":[ "**.csproj" ], "exclude":[ "**/obj/**", "**/bin/**" ] } ], "dest":"api/DisCatSharp.Interactivity", "filter":"filter_config.yml", "disableDefaultFilter":false }, { "src":[ { "src":"../DisCatSharp.Common/", "files":[ "**.csproj" ], "exclude":[ "**/obj/**", "**/bin/**" ] } ], "dest":"api/DisCatSharp.Common", "filter":"filter_config.yml", "disableDefaultFilter":false }, { "src":[ { "src":"../DisCatSharp.Hosting/", "files":[ "**.csproj" ], "exclude":[ "**/obj/**", "**/bin/**" ] } ], "dest":"api/DisCatSharp.Hosting", "filter":"filter_config.yml", "disableDefaultFilter":false }, { "src":[ { "src":"../DisCatSharp.Configuration/", "files":[ "**.csproj" ], "exclude":[ "**/obj/**", "**/bin/**" ] } ], "dest":"api/DisCatSharp.Configuration", "filter":"filter_config.yml", "disableDefaultFilter":false }, { "src":[ { "src":"../DisCatSharp.ApplicationCommands/", "files":[ "**.csproj" ], "exclude":[ "**/obj/**", "**/bin/**" ] } ], "dest":"api/DisCatSharp.ApplicationCommands", "filter":"filter_config.yml", "disableDefaultFilter":false }, { "src":[ { "src":"../DisCatSharp.CommandsNext/", "files":[ "**.csproj" ], "exclude":[ "**/obj/**", "**/bin/**" ] } ], "dest":"api/DisCatSharp.CommandsNext", "filter":"filter_config.yml", "disableDefaultFilter":false }, { "src":[ { "src":"../DisCatSharp.Hosting.DependencyInjection/", "files":[ "**.csproj" ], "exclude":[ "**/obj/**", "**/bin/**" ] } ], "dest":"api/DisCatSharp.Hosting.DependencyInjection", "filter":"filter_config.yml", "disableDefaultFilter":false }, { "src":[ { "src":"../DisCatSharp.Lavalink/", "files":[ "**.csproj" ], "exclude":[ "**/obj/**", "**/bin/**" ] } ], "dest":"api/DisCatSharp.Lavalink", "filter":"filter_config.yml", "disableDefaultFilter":false }, { "src":[ { "src":"../DisCatSharp.VoiceNext/", "files":[ "**.csproj" ], "exclude":[ "**/obj/**", "**/bin/**" ] } ], "dest":"api/DisCatSharp.VoiceNext", "filter":"filter_config.yml", "disableDefaultFilter":false }, { "src":[ { "src":"../DisCatSharp.Attributes/", "files":[ "**.csproj" ], "exclude":[ "**/obj/**", "**/bin/**" ] } ], "dest":"api/DisCatSharp.Attributes", "filter":"filter_config.yml", "disableDefaultFilter":false }, { "src":[ { "src":"../DisCatSharp.Experimental/", "files":[ "**.csproj" ], "exclude":[ "**/obj/**", "**/bin/**" ] } ], "dest":"api/DisCatSharp.Experimental", "filter":"filter_config.yml", "disableDefaultFilter":false } ], "build":{ "xrefService":[ "https://xref.docs.microsoft.com/query?uid={uid}" ], "content":[ { "files":[ "api/**/**.yml", "api/**/**.md", "api/**.yml", "api/**.md" ], "exclude":[ "libdev/**" ] }, { "files":[ "**.md", "toc.yml", "faq/**.yml", "faq/**.md", "articles/**.yml", "articles/**.md", "changelogs/**.yml", "changelogs/**.md", "natives/**.yml", "natives/**.md", "vs/**.yml", "vs/**.md" ], "exclude":[ "**/bin/**", "**/obj/**", "_site/**", "dcs/**" ] } ], "resource":[ { "files":[ "images/**", "natives/**.zip", "./.htaccess" ], "exclude":[ "**/bin/**", "**/obj/**", "_site/**", "images/_**" ] } ], "overwrite":[], "dest":"_site", "globalMetadata":{ "_appTitle": "DisCatSharp Docs", "_appName": "DisCatSharp", "_appFooter": "Made with ♥ by AITSYS", "_copyrightFooter": "© Aiko IT Systems. All rights reserved.", "_enableSearch":true, "_disableSideFilter": false, "_enableNewTab":true, "_disableContribution": false, "_disableBreadcrumb": false, "_gitUrlPattern":"git", "_gitContribute":{ "repo":"https://github.com/Aiko-IT-Systems/DisCatSharp", "branch":"main" } }, "disableGitFeatures":false, "exportRawModel":true, "globalMetadataFiles":[], "fileMetadataFiles":[], "template":[ "dcs" ], "postProcessors":[ "ExtractSearchIndex", - "CustomMemberIndexer", - "MemberLevelManagedReference" + "CustomMemberIndexer" ], "noLangKeyword":false, "keepFileLink":false, "cleanupCacheHistory":false, "sitemap":{ "baseUrl":"https://docs.discatsharp.tech/", "changefreq":"daily", "priority":1.0 } } } diff --git a/rebuild-docs.ps1 b/rebuild-docs.ps1 index ea0086437..c7729fe6d 100644 --- a/rebuild-docs.ps1 +++ b/rebuild-docs.ps1 @@ -1,360 +1,360 @@ #!/usr/bin/env pwsh # Rebuild-docs # # Rebuilds the documentation for DisCatSharp project, and places artifacts in specified directory. # # Author: Emzi0767 # Version: 2017-09-11 14:20 # # Arguments: # .\rebuild-docs.ps1 # # Run as: # .\rebuild-docs.ps1 .\path\to\docfx\project .\path\to\output project-docs param ( [parameter(Mandatory = $true)] [string] $DocsPath, [parameter(Mandatory = $true)] [string] $OutputPath, [parameter(Mandatory = $true)] [string] $PackageName ) # Backup the environment $current_path = $Env:PATH $current_location = Get-Location # Tool paths $docfx_path = Join-Path "$current_location" "docfx" # Restores the environment function Restore-Environment() { Write-Host "Restoring environment variables" $Env:PATH = $current_path Set-Location -path "$current_location" if (Test-Path "$docfx_path") { Remove-Item -recurse -force "$docfx_path" } } # Downloads and installs latest version of DocFX function Install-DocFX([string] $target_dir_path) { Write-Host "Installing DocFX" # Check if the target directory exists # If it does, remove it if (Test-Path "$target_dir_path") { Write-Host "Target directory exists, deleting" Remove-Item -recurse -force "$target_dir_path" } # Create target directory $target_dir = New-Item -type directory "$target_dir_path" $target_fn = "docfx.zip" # Form target path $target_dir = $target_dir.FullName $target_path = Join-Path "$target_dir" "$target_fn" # Download release info from Chocolatey API try { Write-Host "Getting latest DocFX release" $release_json = Invoke-WebRequest -uri "https://chocolatey.org/api/v2/package-versions/docfx" | ConvertFrom-JSON $release_json = $release_json | ForEach-Object { [System.Version]::Parse($_) } | Sort-Object -Descending } catch { Return 1 } # Set TLS version to 1.2 [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 # Download the release # Since GH releases are unreliable, we have to try up to 3 times $tries = 0 $fail = $true while ($tries -lt 3) { # Prepare the assets $release = $release_json[$tries] # Pick the next available release $release_version = $release.ToString() # Convert to string #$release_version = "2.60.1" $release_asset = "https://github.com/Aiko-IT-Systems/docfx/releases/download/v3-internal/docfx.zip" #$release_asset = "https://github.com/dotnet/docfx/releases/download/v$release_version/docfx.zip" # increment try counter $tries = $tries + 1 try { Write-Host "Downloading DocFX $release_version to $target_path" Invoke-WebRequest -uri "$release_asset" -outfile "$target_path" # No failure, carry on Write-Host "DocFX version $release_version downloaded successfully" $fail = $false Break } catch { Write-Host "Downloading DocFX version $release_version failed, trying next ($tries / 3)" #Return 1 } } # Check if we succeeded in downloading if ($fail) { Return 1 } # Switch directory Set-Location -Path "$target_dir" # Extract the release try { Write-Host "Extracting DocFX" Expand-Archive -path "$target_path" -destinationpath "$target_dir" } catch { Return 1 } # Remove the downloaded zip Write-Host "Removing temporary files" Remove-Item "$target_path" # Add DocFX to PATH Write-Host "Adding DocFX to PATH" if ($null -eq $Env:OS) { $Env:DOCFX_PATH = "$target_dir" } else { $Env:PATH = "$target_dir;$current_path" } Set-Location -path "$current_location" Return 0 } # Builds the documentation using available DocFX function BuildDocs([string] $target_dir_path) { # Check if documentation source path exists if (-not (Test-Path "$target_dir_path")) { #Write-Host "Specified path does not exist" Return 65536 } # Check if documentation source path is a directory $target_path = Get-Item "$target_dir_path" if (-not ($target_path -is [System.IO.DirectoryInfo])) { #Write-Host "Specified path is not a directory" Return 65536 } # Form target path $target_path = $target_path.FullName # Form component paths $docs_site = Join-Path "$target_path" "_site" # $libdev_api = Join-Path "$target_path" "libdev" $docs_api = Join-Path "$target_path" "api" - $docs_obj = Join-Path "$target_path" "obj" + #$docs_obj = Join-Path "$target_path" "obj" # Check if API documentation source path exists if (-not (Test-Path "$docs_api")) { #Write-Host "API build target directory does not exist" Return 32768 } # Check if API documentation source path is a directory $docs_api_dir = Get-Item "$docs_api" # $libdev_api_dir = Get-Item "$libdev_api" if (-not ($docs_api_dir -is [System.IO.DirectoryInfo])) { #Write-Host "API build target directory is not a directory" Return 32768 } #if (-not ($libdev_api_dir -is [System.IO.DirectoryInfo])) #{ # #Write-Host "LibDev API build target directory is not a directory" # Return 32768 #} # Purge old API documentation Write-Host "Purging old API documentation" Set-Location -path "$docs_api" Remove-Item "*.yml" #Set-Location -path "$libdev_api" #Remove-Item "*.yml" Set-Location -path "$current_location" # Check if old built site exists # If it does, remove it if (Test-Path "$docs_site") { Write-Host "Purging old products" Remove-Item -recurse -force "$docs_site" } # Create target directory for the built site $docs_site = New-Item -type directory "$docs_site" $docs_site = $docs_site.FullName # Check if old object cache exists # If it does, remove it - if (Test-Path "$docs_obj") - { - Write-Host "Purging object cache" - Remove-Item -recurse -force "$docs_obj" - } + #if (Test-Path "$docs_obj") + #{ + # Write-Host "Purging object cache" + # Remove-Item -recurse -force "$docs_obj" + #} # Create target directory for the object cache - $docs_obj = New-Item -type directory "$docs_obj" - $docs_obj = $docs_obj.FullName + #$docs_obj = New-Item -type directory "$docs_obj" + #$docs_obj = $docs_obj.FullName # Enter the documentation directory Set-Location -path "$target_path" # Check OS # Null means non-Windows if ($null -eq $Env:OS) { # Generate new API documentation & mono "$Env:DOCFX_PATH/docfx.exe" docfx.json | Out-Host # Check if successful if ($LastExitCode -eq 0) { # Build new documentation site & mono "$Env:DOCFX_PATH/docfx.exe" build docfx.json | Out-Host } } else { # Generate new API documentation & docfx docfx.json | Out-Host # Check if successful if ($LastExitCode -eq 0) { # Build new documentation site & docfx build docfx.json | Out-Host } } # Exit back Set-Location -path "$current_location" # Check if building was a success if ($LastExitCode -eq 0) { Return 0 } else { Return $LastExitCode } } # Packages the build site to a .zip archive function PackDocs([string] $target_dir_path, [string] $output_dir_path, [string] $pack_name) { # Form target path $target_path = Get-Item "$target_dir_path" $target_path = $target_path.FullName $target_path = Join-Path "$target_path" "_site" # Form output path $output_path_dir = Get-Item "$output_dir_path" $output_path_dir = $output_path_dir.FullName $output_path = Join-Path "$output_path_dir" "$pack_name" # Enter target path Set-Location -path "$target_path" # Check if target .zip exists # If it does, remove it if (Test-Path "$output_path.zip") { Write-Host "$output_path.zip exists, deleting" Remove-Item "$output_path.zip" } # Package .zip archive Write-Host "Packing $output_path.zip" Compress-Archive -Path "$target_path/*" -DestinationPath "$output_path.zip" -Force -CompressionLevel Fastest # Exit back Set-Location -path "$current_location" # Check if packaging was a success if ($LastExitCode -eq 0) { Return 0 } else { Return $LastExitCode } } # Install DocFX $result = Install-DocFX "$docfx_path" if ($result -ne 0) { Write-Host "Installing DocFX failed" Restore-Environment $host.SetShouldExit(1) Exit 1 } # Build and package docs # At this point nothing should fail as everything is already set up $result = BuildDocs "$DocsPath" if ($result -eq 0) { $result = PackDocs "$DocsPath" "$OutputPath" "$PackageName" if ($result -ne 0) { Write-Host "Packaging API documentation failed" } } else { Write-Host "Building API documentation failed" } # Restore the environment Restore-Environment # All was well, exit with success if ($result -eq 0) { Write-Host "All operations completed" Exit 0 } else { $host.SetShouldExit($result) Exit $result }