Skip to content

Commit

Permalink
pkgdown site
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewallenbruce committed Nov 22, 2024
1 parent acc609d commit b8ba981
Show file tree
Hide file tree
Showing 11 changed files with 159 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,8 @@
^LICENSE\.md$
^CODE_OF_CONDUCT\.md$
^README\.Rmd$
^codecov\.yml$
^\.github$
^_pkgdown\.yml$
^docs$
^pkgdown$
1 change: 1 addition & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.html
49 changes: 49 additions & 0 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# 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, master]
pull_request:
release:
types: [published]
workflow_dispatch:

name: pkgdown.yaml

permissions: read-all

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 }}
permissions:
contents: write
steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- 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.5.0
with:
clean: false
branch: gh-pages
folder: docs
61 changes: 61 additions & 0 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# 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, master]
pull_request:

name: test-coverage.yaml

permissions: read-all

jobs:
test-coverage:
runs-on: ubuntu-latest
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-r-dependencies@v2
with:
extra-packages: any::covr, any::xml2
needs: coverage

- name: Test coverage
run: |
cov <- covr::package_coverage(
quiet = FALSE,
clean = FALSE,
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
)
covr::to_cobertura(cov)
shell: Rscript {0}

- uses: codecov/codecov-action@v4
with:
# Fail if error if not on PR, or if on PR and token is given
fail_ci_if_error: ${{ github.event_name != 'pull_request' || secrets.CODECOV_TOKEN }}
file: ./cobertura.xml
plugin: noop
disable_search: true
token: ${{ secrets.CODECOV_TOKEN }}

- name: Show testthat output
if: always()
run: |
## --------------------------------------------------------------------
find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash

- name: Upload test results
if: failure()
uses: actions/upload-artifact@v4
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
.httr-oauth
.DS_Store
.quarto
docs
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ Authors@R:
Maintainer: Andrew Bruce <andrewallenbruce@gmail.com>
Description: What the package does (one paragraph).
License: MIT + file LICENSE
URL: https://github.com/andrewallenbruce/arktax
URL: https://github.com/andrewallenbruce/arktax,
https://andrewallenbruce.github.io/arktax/
BugReports: https://github.com/andrewallenbruce/arktax/issues
Suggests:
roxyglobals,
Expand Down
10 changes: 8 additions & 2 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,20 @@ knitr::opts_chunk$set(
)
```

# arktax
# **`arktax`**

<!-- badges: start -->
![GitHub R package version](https://img.shields.io/github/r-package/v/andrewallenbruce/arktax?style=flat-square&logo=R&label=Package&color=%23192a38)
[![Codecov test coverage](https://codecov.io/gh/andrewallenbruce/arktax/graph/badge.svg)](https://app.codecov.io/gh/andrewallenbruce/arktax)
[![Code size](https://img.shields.io/github/languages/code-size/andrewallenbruce/arktax.svg)](https://github.com/andrewallenbruce/arktax)
[![Last commit](https://img.shields.io/github/last-commit/andrewallenbruce/arktax.svg)](https://github.com/andrewallenbruce/arktax/commits/master)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://choosealicense.com/licenses/mit/)

<!-- badges: end -->

## Installation

You can install the development version of arktax from [GitHub](https://github.com/) with:
You can install the development version of **`arktax`** from [GitHub](https://github.com/) with:

``` r
# install.packages("pak")
Expand Down
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@

<!-- README.md is generated from README.Rmd. Please edit that file -->

# arktax
# **`arktax`**

<!-- badges: start -->

![GitHub R package
version](https://img.shields.io/github/r-package/v/andrewallenbruce/arktax?style=flat-square&logo=R&label=Package&color=%23192a38)
[![Codecov test
coverage](https://codecov.io/gh/andrewallenbruce/arktax/graph/badge.svg)](https://app.codecov.io/gh/andrewallenbruce/arktax)
[![Code
size](https://img.shields.io/github/languages/code-size/andrewallenbruce/arktax.svg)](https://github.com/andrewallenbruce/arktax)
[![Last
commit](https://img.shields.io/github/last-commit/andrewallenbruce/arktax.svg)](https://github.com/andrewallenbruce/arktax/commits/master)
[![License:
MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://choosealicense.com/licenses/mit/)

<!-- badges: end -->

## Installation

You can install the development version of arktax from
You can install the development version of **`arktax`** from
[GitHub](https://github.com/) with:

``` r
Expand Down
4 changes: 4 additions & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
url: https://andrewallenbruce.github.io/arktax/
template:
bootstrap: 5

14 changes: 14 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
comment: false

coverage:
status:
project:
default:
target: auto
threshold: 1%
informational: true
patch:
default:
target: auto
threshold: 1%
informational: true
1 change: 1 addition & 0 deletions man/arktax-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b8ba981

Please sign in to comment.