From 844ed7026ab5a516bb3fcde0f03682b567ba27a1 Mon Sep 17 00:00:00 2001 From: Chen Yang Date: Mon, 4 Nov 2024 14:07:11 -0600 Subject: [PATCH] Fix GitHub Actions deployment permissions --- .github/workflows/pkgdown.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index 020765f..baec06c 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -16,6 +16,8 @@ jobs: # Only restrict concurrency for non-PR jobs concurrency: group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }} + permissions: + contents: write env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} @@ -37,10 +39,11 @@ jobs: run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE) shell: Rscript {0} - - name: Deploy to GitHub pages 🚀 + - name: Deploy to GitHub pages if: github.event_name != 'pull_request' - uses: JamesIves/github-pages-deploy-action@v4.4.1 + uses: JamesIves/github-pages-deploy-action@v4 with: clean: false branch: gh-pages - folder: docs \ No newline at end of file + folder: docs + token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file