diff --git a/.github/workflows/ce-provision-publish-docs.yml b/.github/workflows/ce-provision-publish-docs.yml index b95472b1d..2745fc41b 100644 --- a/.github/workflows/ce-provision-publish-docs.yml +++ b/.github/workflows/ce-provision-publish-docs.yml @@ -13,6 +13,8 @@ jobs: # Set the job key. The key is displayed as the job name # when a job name is not provided public-docs: + # Only run the job if it is not coming from a documentation branch + if: ${{ github.event.pull_request.head.ref != 'docs-${{ github.event.pull_request.base.ref }}' }} # Name the Job name: Publish the ce-provision docs to GitHub # Set the type of machine to run on @@ -50,7 +52,6 @@ jobs: # Create docs pull request - name: Create a documentation pull request - if: ${{ github.event.pull_request.head.ref != 'docs-${{ github.event.pull_request.base.ref }}' }} run: gh pr create --base ${{ github.event.pull_request.base.ref }} --head docs-${{ github.event.pull_request.base.ref }} --title "Documentation update" --body "**Automated pull request** created by GitHub Actions because of a documentation update." env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -82,7 +83,6 @@ jobs: - name: Run Hugo run: | /usr/bin/su - ce-dev -c "cd /home/ce-dev/build/wiki2pages && hugo" - ls -la /home/ce-dev/build/wiki2pages/public/ce-provision-${{ github.event.pull_request.base.ref }}/ - name: Publish documentation run: |