Skip to content

Commit

Permalink
Fix GitHub Actions deployment permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
cafferychen777 committed Nov 4, 2024
1 parent 6c84c10 commit 844ed70
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Expand All @@ -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
folder: docs
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 844ed70

Please sign in to comment.