From 92bb7a1239c4806baf0abad458f01ed79f5c6a3e Mon Sep 17 00:00:00 2001 From: Michael DeWitt Date: Thu, 14 May 2020 15:54:10 -0400 Subject: [PATCH] first part of the infrastrture. Need the gh-pages orphan branch --- .Rbuildignore | 2 ++ .github/workflows/pkgdown.yaml | 44 ++++++++++++++++++++++++++++++++++ .gitignore | 1 + README.Rmd | 1 + 4 files changed, 48 insertions(+) create mode 100644 .github/workflows/pkgdown.yaml diff --git a/.Rbuildignore b/.Rbuildignore index 098c7bd..368b0a4 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -9,3 +9,5 @@ ^inst/pkg-structure$ ^_pkgdown.yml$ ^\.github$ +^_pkgdown\.yml$ +^pkgdown$ diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml new file mode 100644 index 0000000..5e9a811 --- /dev/null +++ b/.github/workflows/pkgdown.yaml @@ -0,0 +1,44 @@ +on: + push: + branches: master + +name: pkgdown + +jobs: + pkgdown: + runs-on: macOS-latest + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + steps: + - uses: actions/checkout@v2 + + - uses: r-lib/actions/setup-r@master + + - uses: r-lib/actions/setup-pandoc@master + + - name: Query dependencies + run: | + install.packages('remotes') + saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2) + shell: Rscript {0} + + - name: Cache R packages + uses: actions/cache@v1 + with: + path: ${{ env.R_LIBS_USER }} + key: macOS-r-4.0-1-${{ hashFiles('.github/depends.Rds') }} + restore-keys: macOS-r-4.0-1- + + - name: Install dependencies + run: | + install.packages("remotes") + remotes::install_deps(dependencies = TRUE) + remotes::install_dev("pkgdown") + shell: Rscript {0} + + - name: Install package + run: R CMD INSTALL . + + - name: Deploy package + run: pkgdown::deploy_to_branch(new_process = FALSE) + shell: Rscript {0} diff --git a/.gitignore b/.gitignore index a0bc0d7..2f6dba8 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ .Rproj.user inst/doc .DS_Store +docs diff --git a/README.Rmd b/README.Rmd index 4539b3d..03ce731 100644 --- a/README.Rmd +++ b/README.Rmd @@ -13,6 +13,7 @@ knitr::opts_chunk$set( # EpiSoon [![DOI](https://zenodo.org/badge/248311916.svg)](https://zenodo.org/badge/latestdoi/248311916) +[![R build status](https://github.com/epiforecasts/EpiSoon/workflows/R-CMD-check/badge.svg)](https://github.com/epiforecasts/EpiSoon) [![Build Status](https://travis-ci.com/epiforecasts/EpiSoon.svg?branch=master)](https://travis-ci.com/epiforecasts/EpiSoon)