diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 023bcf089..5a072e4ae 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -1,110 +1,108 @@ 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: token: ${{ secrets.NYUW_TOKEN_GH }} - name: Setup .NET uses: actions/setup-dotnet@v3.0.3 with: dotnet-version: 6.x - name: Restore packages run: dotnet restore - name: Build library run: dotnet build -c Release - - name: Test library - run: dotnet test -c Release continue-on-error: true - name: Build Docs 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 + path: ../dcs-docs.zip retention-days: 30 - name: Commit and push changes uses: EndBug/add-and-commit@main with: 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 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: Extract new 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: 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/docfx.json b/DisCatSharp.Docs/docfx.json index 2a0ade058..ee20d3e36 100644 --- a/DisCatSharp.Docs/docfx.json +++ b/DisCatSharp.Docs/docfx.json @@ -1,300 +1,301 @@ { "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, + "exportRawModel":false, + "exportViewModel": false, "globalMetadataFiles":[], "fileMetadataFiles":[], "template":[ "dcs" ], "postProcessors":[ "ExtractSearchIndex", "CustomMemberIndexer" ], "noLangKeyword":false, "keepFileLink":false, "cleanupCacheHistory":false, "sitemap":{ "baseUrl":"https://docs.discatsharp.tech/", "changefreq":"daily", "priority":1.0 } } }