diff --git a/.Rbuildignore b/.Rbuildignore new file mode 100644 index 0000000..bf2e3f7 --- /dev/null +++ b/.Rbuildignore @@ -0,0 +1,7 @@ +^\.github$ +^docs$ +^_pkgdown\.yml$ +^\.gitignore$ +^knockofftools\.Rproj$ +^LICENSE$ +^README\.md$ diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml new file mode 100644 index 0000000..6f8e219 --- /dev/null +++ b/.github/workflows/R-CMD-check.yaml @@ -0,0 +1,48 @@ +# 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: [main] + pull_request: + branches: [main] + +name: R-CMD-check + +permissions: read-all + +jobs: + R-CMD-check: + runs-on: ${{ matrix.config.os }} + name: R-CMD-check (${{ matrix.config.os }}, ${{ matrix.config.r }}) + + strategy: + fail-fast: false + matrix: + config: + - {os: ubuntu-latest, r: 'release'} + - {os: ubuntu-latest, r: 'oldrel-1'} + - {os: macos-latest, r: 'release'} + + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + R_KEEP_PKG_SOURCE: yes + + steps: + - uses: actions/checkout@v4 + + - uses: r-lib/actions/setup-r@v2 + with: + r-version: ${{ matrix.config.r }} + use-public-rspm: true + + - uses: r-lib/actions/setup-pandoc@v2 + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: any::rcmdcheck + needs: check + + - uses: r-lib/actions/check-r-package@v2 + with: + upload-snapshots: true + build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")' diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml new file mode 100644 index 0000000..aaa01e1 --- /dev/null +++ b/.github/workflows/pkgdown.yaml @@ -0,0 +1,45 @@ +# 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: [main] + workflow_dispatch: + +name: pkgdown + +permissions: + contents: write + +jobs: + pkgdown: + 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 }} + steps: + - uses: actions/checkout@v4 + + - uses: r-lib/actions/setup-r@v2 + with: + use-public-rspm: true + + - uses: r-lib/actions/setup-pandoc@v2 + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: any::pkgdown, local::. + needs: website + + - name: Build site + run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE) + shell: Rscript {0} + + - name: Deploy to GitHub Pages + if: github.event_name != 'pull_request' + uses: JamesIves/github-pages-deploy-action@v4 + with: + clean: false + branch: gh-pages + folder: docs diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6255bde --- /dev/null +++ b/.gitignore @@ -0,0 +1,15 @@ +# R session files +.Rhistory +.Rdata +.RData +.Ruserdata +.Rproj.user + +# Built vignettes +inst/doc + +# macOS +.DS_Store + +# pkgdown site +docs/ diff --git a/README.md b/README.md index 417d88f..7825441 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ + +[![R-CMD-check](https://github.com/openpharma/knockofftools/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/openpharma/knockofftools/actions/workflows/R-CMD-check.yaml) + + The `knockofftools` package ==================== diff --git a/_pkgdown.yml b/_pkgdown.yml index 7456055..2b859b8 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -1,4 +1,4 @@ -url: http://opensource.nibr.com/knockofftools/ +url: https://openpharma.github.io/knockofftools/ template: bootstrap: 5