Skip to content

Commit

Permalink
Add pkdown scaffolding
Browse files Browse the repository at this point in the history
  • Loading branch information
grantmcdermott committed Dec 4, 2021
1 parent d1857c3 commit da412ad
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@
^.*\.Rproj$
^\.Rproj\.user$
^README\.Rmd$
^_pkgdown\.yml$
^docs$
^pkgdown$
^\.github$
1 change: 1 addition & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.html
33 changes: 33 additions & 0 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# 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]
tags: ['*']

name: pkgdown

jobs:
pkgdown:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2

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

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

- uses: r-lib/actions/setup-r-dependencies@v1
with:
extra-packages: pkgdown
needs: website

- name: Deploy package
run: |
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "[email protected]"
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
**/skeleton.pdf
**/skeleton_files/
**/*.log
docs
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ Description: Template for exporting to both HTML and PDF formats. Takes care of
License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
URL: https://github.com/grantmcdermott/lecturenotes
URL: https://github.com/grantmcdermott/lecturenotes,
http://grantmcdermott.com/lecturenotes
BugReports: https://github.com/grantmcdermott/lecturenotes/issues
Depends:
R (>= 3.1.0)
Expand Down
17 changes: 17 additions & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
url: http://grantmcdermott.com/lecturenotes
template:
bootstrap: 5
navbar:
title: "lecturenotes"
left:
- text: "Home"
href: index.html
- text: "Samples"
menu:
- text: "HTML"
href: "lecturenotes/lecturenotes.html"
- text: "PDF"
href: "lecturenotes/lecturenotes.pdf"
right:
- text: "News"
href: "news/index.html"

0 comments on commit da412ad

Please sign in to comment.