diff --git a/.github/workflows/bookdown.yaml b/.github/workflows/bookdown.yaml index 3da6d75..8272756 100644 --- a/.github/workflows/bookdown.yaml +++ b/.github/workflows/bookdown.yaml @@ -1,4 +1,4 @@ -# Workflow derived from https://github.com/r-lib/actions/tree/master/examples +# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples # Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help on: push: @@ -10,18 +10,23 @@ on: - cron: '0 23 * * *' workflow_dispatch: -name: bookdown +name: bookdown.yaml + +permissions: read-all jobs: bookdown: runs-on: ubuntu-latest + # Only restrict concurrency for non-PR jobs + concurrency: + group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }} env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} isExtPR: ${{ github.event.pull_request.head.repo.fork == true }} - concurrency: - group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }} + permissions: + contents: write steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: r-lib/actions/setup-pandoc@v2 @@ -32,7 +37,7 @@ jobs: - uses: r-lib/actions/setup-r-dependencies@v2 - name: Cache bookdown results - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: _bookdown_files key: bookdown-${{ hashFiles('**/*Rmd') }} @@ -50,7 +55,7 @@ jobs: - name: Deploy to Netlify if: contains(env.isExtPR, 'false') id: netlify-deploy - uses: nwtgck/actions-netlify@v1.2 + uses: nwtgck/actions-netlify@v3.0 with: publish-dir: './_book' production-branch: main