From 806b45beef335a5d8b8810fce7b4c781408b98ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Wei=C3=9F?= <72068105+Sandoun@users.noreply.github.com> Date: Mon, 21 Aug 2023 14:30:28 +0200 Subject: [PATCH] (pipeline) docbuilder custom branch --- .github/workflows/test-pipeline.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test-pipeline.yml b/.github/workflows/test-pipeline.yml index fd887d0..68a40a8 100644 --- a/.github/workflows/test-pipeline.yml +++ b/.github/workflows/test-pipeline.yml @@ -38,20 +38,23 @@ jobs: - name: 'Run tests' run: dotnet test "./MewtocolTests" /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput=../Builds/TestResults/coverage.opencover.xml - + - name: 'Run docbuilder' continue-on-error: true - run: dotnet run --project "./AutoTools.DocBuilder/AutoTools.DocBuilder.csproj" "./AutoTools.DocBuilder/Docs/plctypes.md" + run: | + dotnet run --project "./AutoTools.DocBuilder/AutoTools.DocBuilder.csproj" "~/plctypes.md" - - name: 'Commit generated docs to branch' + - name: 'Switch and Commit to docs branch' continue-on-error: true run: | git fetch - git checkout ${{ steps.extract_branch.outputs.branch }} git config --local user.email "action@github.com" git config --local user.name "GitHub Action" - git add "./AutoTools.DocBuilder/Docs/plctypes.md" -f && - git commit --amend --no-edit + git checkout --orphan ${{ steps.extract_branch.outputs.branch }}_docs + git rm -rf . + cp ~/plctypes.md ./plctypes.md && + git add "./plctypes.md" -f && + git commit -m "Update documentation" - name: 'Push docs commit' uses: ad-m/github-push-action@master