From 58f3433de63a1e6c432ef5ef0de4d75ddd2da0c0 Mon Sep 17 00:00:00 2001 From: Chris Titus Date: Fri, 1 Nov 2024 15:18:12 -0500 Subject: [PATCH] fix doc privs for pushing new prs to docs --- .github/workflows/github-pages.yml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/github-pages.yml b/.github/workflows/github-pages.yml index 30e992d4..94ca5e3c 100644 --- a/.github/workflows/github-pages.yml +++ b/.github/workflows/github-pages.yml @@ -13,6 +13,10 @@ on: jobs: build-and-deploy: runs-on: ubuntu-latest + environment: linutil_env + permissions: + contents: write + pull-requests: write steps: - name: Checkout Repository @@ -24,11 +28,17 @@ jobs: run: | echo -e "\n\n$(cat .github/CONTRIBUTING.md)" > 'docs/contributing.md' - - uses: stefanzweifel/git-auto-commit-action@v5 + - name: Create Pull Request + uses: peter-evans/create-pull-request@v6 with: - commit_message: Commit Contributing Guidelines - file_pattern: "docs/contributing.md" - add_options: '--force' + commit-message: Update Contributing Guidelines + title: 'docs: Update Contributing Guidelines' + body: 'Automated update of Contributing Guidelines from .github/CONTRIBUTING.md' + branch: update-contributing-guidelines + delete-branch: true + base: main + labels: documentation + token: ${{ secrets.PAT_TOKEN }} if: success() - name: Setup Python