Skip to content

Commit

Permalink
usethis::use_pkgdown_github_pages()
Browse files Browse the repository at this point in the history
  • Loading branch information
gvelasq committed Mar 25, 2022
1 parent 95b3530 commit 1c6a281
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 39 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@
^ISSUE_TEMPLATE\.md$
^appveyor\.yml$
^\.github$
^pkgdown$
52 changes: 14 additions & 38 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -1,58 +1,34 @@
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches:
- main
- master
branches: [main, master]
release:
types: [published]
workflow_dispatch:

name: pkgdown

jobs:
pkgdown:
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
env:
RSPM: https://packagemanager.rstudio.com/cran/__linux__/bionic/latest
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@v1
id: install-r

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

- name: Install pak and query dependencies
run: |
install.packages("pak", repos = "https://r-lib.github.io/p/pak/dev/")
saveRDS(pak::pkg_deps("local::.", dependencies = TRUE), ".github/r-depends.rds")
shell: Rscript {0}

- name: Restore R package cache
uses: actions/cache@v2
- uses: r-lib/actions/setup-r@v1
with:
path: |
${{ env.R_LIBS_USER }}
!${{ env.R_LIBS_USER }}/pak
key: ubuntu-18.04-${{ steps.install-r.outputs.installed-r-version }}-1-${{ hashFiles('.github/r-depends.rds') }}
restore-keys: ubuntu-18.04-${{ steps.install-r.outputs.installed-r-version }}-1-
use-public-rspm: true

- name: Install system dependencies
if: runner.os == 'Linux'
run: |
pak::local_system_requirements(execute = TRUE)
pak::pkg_system_requirements("pkgdown", execute = TRUE)
shell: Rscript {0}

- name: Install dependencies
run: |
pak::local_install_dev_deps(upgrade = TRUE)
pak::pkg_install("pkgdown")
shell: Rscript {0}

- name: Install package
run: R CMD INSTALL .
- uses: r-lib/actions/setup-r-dependencies@v1
with:
extra-packages: pkgdown
needs: website

- name: Build and deploy pkgdown site
- name: Deploy package
run: |
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com"
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
.Ruserdata
.DS_Store
docs/*
docs
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ Author: Gustavo Velásquez <gvelasq2github@gmail.com>
Maintainer: Gustavo Velásquez <gvelasq2github@gmail.com>
Description: Functions to create tables of frequencies.
License: MIT + file LICENSE
URL: https://github.com/gvelasq/tidytab
URL: https://github.com/gvelasq/tidytab,
https://gvelasq.github.io/tidytab/
BugReports: https://github.com/gvelasq/tidytab/issues
Depends:
R (>= 3.2)
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://gvelasq.github.io/tidytab/
template:
bootstrap: 5

0 comments on commit 1c6a281

Please sign in to comment.