From 4384dd68129844fd5a1350dc7796c6484d05d916 Mon Sep 17 00:00:00 2001 From: Mark Webster Date: Sun, 6 Oct 2024 20:09:17 +0100 Subject: [PATCH] Add package site --- .Rbuildignore | 4 ++++ .github/.gitignore | 1 + .github/workflows/pkgdown.yaml | 35 ++++++++++++++++++++++++++++++++++ .gitignore | 1 + DESCRIPTION | 2 ++ _pkgdown.yml | 5 +++++ 6 files changed, 48 insertions(+) create mode 100644 .github/.gitignore create mode 100644 .github/workflows/pkgdown.yaml create mode 100644 _pkgdown.yml diff --git a/.Rbuildignore b/.Rbuildignore index 6d1844b..8ab0cdd 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -5,3 +5,7 @@ ^Meta$ ^data-raw$ ^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..086d08c --- /dev/null +++ b/.github/workflows/pkgdown.yaml @@ -0,0 +1,35 @@ +# 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] + release: + types: [published] + workflow_dispatch: + +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@v2 + + - uses: r-lib/actions/setup-r@v2 + with: + use-public-rspm: true + + - uses: r-lib/actions/setup-r-dependencies@v2 + 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 7a7155e..0691ddd 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ inst/doc /doc/ /Meta/ +docs diff --git a/DESCRIPTION b/DESCRIPTION index d84e0e0..205b6d0 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -36,3 +36,5 @@ Suggests: rmarkdown VignetteBuilder: knitr LazyData: true +URL: https://charnelmouse.github.io/autodb/, https://github.com/CharnelMouse/autodb +BugReports: https://github.com/CharnelMouse/autodb/issues diff --git a/_pkgdown.yml b/_pkgdown.yml new file mode 100644 index 0000000..0f655c1 --- /dev/null +++ b/_pkgdown.yml @@ -0,0 +1,5 @@ +url: https://charnelmouse.github.io/autodb/ +template: + bootstrap: 5 + light-switch: true +