From 51620e6d9d7c924b2b2b6bf9d0c949ffdfa32c46 Mon Sep 17 00:00:00 2001 From: pvictor Date: Wed, 22 Dec 2021 17:22:38 +0100 Subject: [PATCH] added pkgdown website --- .Rbuildignore | 3 +++ .github/workflows/pkgdown.yaml | 35 ++++++++++++++++++++++++++++++++++ .gitignore | 1 + DESCRIPTION | 1 + _pkgdown.yml | 20 +++++++++++++++++++ 5 files changed, 60 insertions(+) create mode 100644 .github/workflows/pkgdown.yaml create mode 100644 _pkgdown.yml diff --git a/.Rbuildignore b/.Rbuildignore index e3837e9..dbac901 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -10,3 +10,6 @@ examples/ ^webpack\.dev\.js$ ^webpack\.prod\.js$ ^webpack\.common\.js$ +^_pkgdown\.yml$ +^docs$ +^pkgdown$ diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml new file mode 100644 index 0000000..63cbb18 --- /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@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 032b4a0..146cf43 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ *.Rproj inst/doc node_modules +docs diff --git a/DESCRIPTION b/DESCRIPTION index 78746a9..1c7cc28 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -25,3 +25,4 @@ Suggests: leaflet, dygraphs VignetteBuilder: knitr +URL: https://dreamrs.github.io/capture diff --git a/_pkgdown.yml b/_pkgdown.yml new file mode 100644 index 0000000..fa57642 --- /dev/null +++ b/_pkgdown.yml @@ -0,0 +1,20 @@ +url: https://dreamrs.github.io/capture + +template: + bootstrap: 5 + bootswatch: zephyr + bslib: + base_font: {google: "Poppins"} + primary: "#112446" + +navbar: + bg: primary + +authors: + Victor Perrier: + href: https://twitter.com/_pvictorr + html: Victor Perrier + Fanny Meyer: + href: https://twitter.com/_mfaan + html: Fanny Meyer +