diff --git a/.Rbuildignore b/.Rbuildignore new file mode 100644 index 0000000..91114bf --- /dev/null +++ b/.Rbuildignore @@ -0,0 +1,2 @@ +^.*\.Rproj$ +^\.Rproj\.user$ diff --git a/.github/workflows/build-book.yaml b/.github/workflows/build-book.yaml index 1e93697..d9fc652 100644 --- a/.github/workflows/build-book.yaml +++ b/.github/workflows/build-book.yaml @@ -1,13 +1,14 @@ +# 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: - branches: - - master + branches: [main, master] pull_request: - branches: - - master + branches: [main, master] schedule: - # run every day at 11 PM - - cron: '0 23 * * *' + # run every day at 11:05 PM Pacific + - cron: '5 7 * * *' + workflow_dispatch: name: build-book @@ -18,33 +19,15 @@ jobs: build: env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - runs-on: macOS-latest + runs-on: ubuntu-latest steps: - - name: Checkout repo - uses: actions/checkout@master + - uses: actions/checkout@v2 - - name: Setup R - uses: r-lib/actions/setup-r@master - - - name: Setup pandoc - uses: r-lib/actions/setup-pandoc@master - - - name: Cache R packages - uses: actions/cache@v1 + - uses: r-lib/actions/setup-r@v2 with: - path: ${{ env.R_LIBS_USER }} - key: r-5-${{ hashFiles('DESCRIPTION') }} - restore-keys: r-5- - - - name: Install pak - run: | - install.packages("pak", repos = "https://r-lib.github.io/p/pak/dev/") - shell: Rscript {0} + use-public-rspm: true - - name: Install dependencies - run: | - pak::local_install_dev_deps() - shell: Rscript {0} + - uses: r-lib/actions/setup-r-dependencies@v2 - name: Cache bookdown results uses: actions/cache@v1