diff --git a/.github/workflows/ce-provision-build-docs.yml b/.github/workflows/ce-provision-build-docs.yml deleted file mode 100644 index fc7286a73..000000000 --- a/.github/workflows/ce-provision-build-docs.yml +++ /dev/null @@ -1,52 +0,0 @@ -name: Build docs - -# Run this workflow every time a new commit pushed to your repository -on: pull_request - -jobs: - # Set the job key. The key is displayed as the job name - # when a job name is not provided - build-docs: - # Name the Job - name: Build the documentation - # Set the type of machine to run on - runs-on: ubuntu-20.04 - - steps: - # Checks out a copy of your repository on the ubuntu-latest machine - - name: Checkout code - if: ${{ github.event.pull_request.head.ref != 'documentation' }} - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - # Configures global Git variables for committing - - name: Configure Git - run: | - git config --global user.email "sysadm@codeenigma.com" - git config --global user.name "Code Enigma CI" - git config --global pull.rebase false - - # Builds the docs - - name: Build documentation - if: ${{ github.event.pull_request.head.ref != 'documentation' && github.event.pull_request.base.ref == '1.x' }} - run: | - git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} - git fetch - /bin/sh ./contribute/toc.sh - find . -name "*.md" | xargs git add - git diff --quiet && git diff --staged --quiet || git commit -am 'GitHub Actions - Rebuilt documentation.' - git pull origin documentation - git push origin HEAD:documentation - shell: bash - - # Create docs pull request - - name: Create a documentation pull request - if: ${{ github.event.pull_request.head.ref != 'documentation' && github.event.pull_request.base.ref == '1.x' }} - uses: repo-sync/pull-request@v2 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - source_branch: documentation - destination_branch: ${{ github.event.pull_request.base.ref }} - pr_title: Documentation update. - pr_body: "**Automated pull request** created by GitHub Actions because of a documentation update." diff --git a/.github/workflows/ce-provision-publish-docs.yml b/.github/workflows/ce-provision-publish-docs.yml index 2745fc41b..dceaf2687 100644 --- a/.github/workflows/ce-provision-publish-docs.yml +++ b/.github/workflows/ce-provision-publish-docs.yml @@ -51,8 +51,10 @@ jobs: /usr/bin/git push # Create docs pull request - - name: Create a documentation pull request - 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." + - name: Create documentation pull requests + run: | + gh pr create --base ${{ github.event.pull_request.base.ref }} --head docs-${{ github.event.pull_request.base.ref }} --title "Documentation update - ${{ github.event.pull_request.base.ref }}" --body "**Automated pull request** created by GitHub Actions because of a documentation update." || echo "No commits between ${{ github.event.pull_request.base.ref }} and docs-${{ github.event.pull_request.base.ref }} - no PR created!" + gh pr create --base devel-${{ github.event.pull_request.base.ref }} --head docs-${{ github.event.pull_request.base.ref }} --title "Documentation update - devel-${{ github.event.pull_request.base.ref }}" --body "**Automated pull request** created by GitHub Actions because of a documentation update." || echo "No commits between devel-${{ github.event.pull_request.base.ref }} and docs-${{ github.event.pull_request.base.ref }} - no PR created!" env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}