diff --git a/.github/workflows/test_docs.yml b/.github/workflows/test_docs.yml new file mode 100644 index 000000000..39b4dc840 --- /dev/null +++ b/.github/workflows/test_docs.yml @@ -0,0 +1,42 @@ +name: "Test Documentation" +on: + 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 + - name: Setup .NET + uses: actions/setup-dotnet@v2 + with: + dotnet-version: 6.0.400 + - 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