From 5d200eccdf58b0353384f7448597131fb60edd1e Mon Sep 17 00:00:00 2001 From: Dominique Marcadet Date: Fri, 14 Jun 2024 10:37:57 +0200 Subject: [PATCH] try with pr --- .github/workflows/Build-Documentation.yml | 26 +++++++++++++++-------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/.github/workflows/Build-Documentation.yml b/.github/workflows/Build-Documentation.yml index ce6da49..db22774 100644 --- a/.github/workflows/Build-Documentation.yml +++ b/.github/workflows/Build-Documentation.yml @@ -25,15 +25,11 @@ jobs: build-python-launcher-docs: runs-on: ubuntu-22.04 - permissions: - contents: write - steps: - name: Checkout ${{ github.event.repository.name }} uses: actions/checkout@v4 with: path: ${{ github.event.repository.name }} - fetch-depth: 0 - name: Checkout riseclipse-temporary uses: actions/checkout@v4 @@ -65,13 +61,25 @@ jobs: git config --global user.email github-actions@github.com git config --global user.name "GitHub Actions" - - name: Commit and push to GitHub + - name: Create and switch to branch new_documentation + run: | + cd riseclipse-temporary + git branch new_documentation + git switch new_documentation + git push --set-upstream origin new_documentation + + - name: Commit new documentation run: | cd riseclipse-temporary git add --all git commit -m "New version of documentation of python-launcher" - git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/riseclipse/riseclipse-temporary - git push - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v5 + with: + base: master + branch: new_documentation + labels: automated pr + title: '[action] New documentation built' + path: riseclipse-temporary