From 12bf391f3a012a17d74d57abd4dd739afd1de2fa Mon Sep 17 00:00:00 2001 From: David Sanders Date: Fri, 6 Oct 2023 08:10:12 -0700 Subject: [PATCH] ci: use GitHub app for commits --- .github/workflows/gh-pages.yml | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 39ac9a145a..afe7e59eee 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -11,15 +11,23 @@ jobs: concurrency: group: ${{ github.workflow }}-${{ github.ref }} steps: - - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 #v3.1.0 + - name: Generate GitHub App token + uses: electron/github-app-auth-action@384fd19694fe7b6dcc9a684746c6976ad78228ae # v1.1.1 + id: generate-token + with: + creds: ${{ secrets.GH_APP_CREDS }} + export-git-user: true + + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: submodules: true fetch-depth: 0 + token: ${{ steps.generate-token.outputs.token }} - name: Use Node.js LTS - uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 #v.3.5.1 + uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 with: - node-version: 16.x + node-version: 20.x cache: yarn - name: Build @@ -29,8 +37,10 @@ jobs: yarn docs - name: Deploy - uses: peaceiris/actions-gh-pages@v3 + uses: peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847 # v3.9.3 with: - github_token: ${{ secrets.GITHUB_TOKEN }} + github_token: ${{ steps.generate-token.outputs.token }} publish_dir: ./docs cname: js.electronforge.io + user_name: ${{ env.GIT_COMMITTER_NAME }} + user_email: ${{ env.GIT_COMMITTER_EMAIL }}