From 51b2425997001da4d3be54d2e60f97e87b23d68e Mon Sep 17 00:00:00 2001 From: HavenDV Date: Sun, 17 Nov 2024 15:37:41 +0400 Subject: [PATCH] ci: Updated. --- .github/workflows/auto-format.yml | 5 +++++ .github/workflows/auto-merge.yml | 2 +- .github/workflows/mkdocs.yml | 11 ++++++++++- .github/workflows/pull-request.yml | 1 + 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/auto-format.yml b/.github/workflows/auto-format.yml index 5dc6071..5e80b67 100644 --- a/.github/workflows/auto-format.yml +++ b/.github/workflows/auto-format.yml @@ -29,6 +29,11 @@ jobs: git checkout -b ${{ steps.branch.outputs.branch_name }} origin/main git rebase main + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 9.0.x + - name: Format code run: | dotnet format diff --git a/.github/workflows/auto-merge.yml b/.github/workflows/auto-merge.yml index ec3e4d2..3ca8ec7 100644 --- a/.github/workflows/auto-merge.yml +++ b/.github/workflows/auto-merge.yml @@ -11,7 +11,7 @@ permissions: jobs: auto-merge: runs-on: ubuntu-latest - if: ${{ (github.actor == 'dependabot[bot]' || github.actor == 'allcontributors[bot]' || github.actor == 'HavenDV') && github.repository_owner == 'tryAGI' }} + if: ${{ github.event.pull_request.draft == false && (github.actor == 'dependabot[bot]' || github.actor == 'allcontributors[bot]' || github.actor == 'HavenDV') && github.repository_owner == 'tryAGI' }} steps: - name: Dependabot metadata if: ${{ github.actor == 'dependabot[bot]' }} diff --git a/.github/workflows/mkdocs.yml b/.github/workflows/mkdocs.yml index 9915996..6ad2d49 100644 --- a/.github/workflows/mkdocs.yml +++ b/.github/workflows/mkdocs.yml @@ -34,12 +34,21 @@ jobs: - name: Install dependencies run: pip install mkdocs-material + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 9.0.x - name: Generate docs run: dotnet run --project src/Helpers/GenerateDocs/GenerateDocs.csproj . - name: Build with MkDocs - run: mkdocs build -d ./_site + run: | + python -m venv myenv + source myenv/bin/activate + pip install mkdocs-material + mkdocs build -d ./_site - name: Upload artifact uses: actions/upload-pages-artifact@v3 diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 0da006a..17fc4f2 100755 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -7,6 +7,7 @@ on: jobs: build-test: name: Build and test + if: github.event.pull_request.draft == false uses: HavenDV/workflows/.github/workflows/dotnet_build-test-publish.yml@main with: generate-build-number: false