Skip to content

Commit

Permalink
switch from old docker to new renv #27
Browse files Browse the repository at this point in the history
  • Loading branch information
bbest committed Aug 27, 2021
1 parent 30354c1 commit ab95284
Showing 1 changed file with 28 additions and 3 deletions.
31 changes: 28 additions & 3 deletions .github/workflows/make_pages_on_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,45 @@ on:

jobs:
build:
runs-on: ubuntu-latest
runs-on: macOS-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
if: "!contains(github.event.head_commit.message, 'ci skip')"
container: bdbest/cinms:1.0 # docker image
#container: bdbest/cinms:1.0 # docker image
steps:

- name: clone repo
# get a shallow copy (depth 1) so only getting the latest version of files, not whole history
run: git clone --depth 1 https://github.com/${{ github.repository }}.git .; ls

- name: Setup R
uses: r-lib/actions/setup-r@v1

- name: Install pandoc
run: |
brew install pandoc
- name: Cache Renv packages
uses: actions/cache@v2
with:
path: $HOME/.local/share/renv
key: r-${{ hashFiles('renv.lock') }}
restore-keys: r-

- name: Install packages
run: |
R -e 'install.packages("renv")'
R -e 'renv::restore()'
- name: make_pages
run: Rscript scripts/make_pages.R
run: Rscript scripts/make_pages.R > scripts/output_render.log
# DEBUG: output to log, otherwise prevent unnecessary commit if files unchanged (b/c temp file always diff't)
#run: Rscript scripts/make_pages.R > scripts/output_render.log

- name: if failure
if: failure()
run: tail -n40 scripts/output_render.log

- name: commit changes
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
Expand Down

0 comments on commit ab95284

Please sign in to comment.