Skip to content

Commit

Permalink
Freshen up the GHA workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jennybc committed Sep 11, 2024
1 parent 93ad349 commit e9ca8db
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/bookdown.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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

Expand All @@ -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') }}
Expand All @@ -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
Expand Down

0 comments on commit e9ca8db

Please sign in to comment.