diff --git a/.Rbuildignore b/.Rbuildignore index 428fd47..2f463de 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -3,3 +3,7 @@ ^.*\.Rproj$ ^\.Rproj\.user$ ^README\.Rmd$ +^_pkgdown\.yml$ +^docs$ +^pkgdown$ +^\.github$ diff --git a/.github/.gitignore b/.github/.gitignore new file mode 100644 index 0000000..2d19fc7 --- /dev/null +++ b/.github/.gitignore @@ -0,0 +1 @@ +*.html diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml new file mode 100644 index 0000000..59ae308 --- /dev/null +++ b/.github/workflows/pkgdown.yaml @@ -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 "$GITHUB_ACTOR@users.noreply.github.com" + Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)' diff --git a/.gitignore b/.gitignore index fbe7dfb..832beab 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ **/skeleton.pdf **/skeleton_files/ **/*.log +docs diff --git a/DESCRIPTION b/DESCRIPTION index 7e0e545..0354e55 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -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) diff --git a/_pkgdown.yml b/_pkgdown.yml new file mode 100644 index 0000000..5b6f7ea --- /dev/null +++ b/_pkgdown.yml @@ -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"