From e7f2943b343f939075acd9150c0593e6fa72ed7c Mon Sep 17 00:00:00 2001 From: Anna SMYK Date: Tue, 21 Nov 2023 11:51:21 +0100 Subject: [PATCH] config gh pages --- .github/.gitignore | 1 + .github/workflows/pkgdown.yaml | 52 ++++++++++++++++++++++++++++++++++ .gitignore | 1 + DESCRIPTION | 2 +- _pkgdown.yml | 4 +++ 5 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 .github/.gitignore create mode 100644 .github/workflows/pkgdown.yaml create mode 100644 _pkgdown.yml diff --git a/.github/.gitignore b/.github/.gitignore new file mode 100644 index 00000000..2d19fc76 --- /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 00000000..543fba1e --- /dev/null +++ b/.github/workflows/pkgdown.yaml @@ -0,0 +1,52 @@ +# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples +# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help +on: + push: + branches: [develop] + pull_request: + branches: [develop] + release: + types: [published] + workflow_dispatch: + +name: pkgdown + +jobs: + pkgdown: + runs-on: ubuntu-latest + # Only restrict concurrency for non-PR jobs + concurrency: + group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }} + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + permissions: + contents: write + steps: + - uses: actions/checkout@v3 + + - uses: r-lib/actions/setup-pandoc@v2 + + - uses: actions/setup-java@v3 + with: + distribution: 'zulu' # See 'Supported distributions' for available options + java-version: '17' + + - uses: r-lib/actions/setup-r@v2 + with: + use-public-rspm: true + + - name: Set up for RProtoBuf + run: sudo apt-get update -y && sudo apt-get install protobuf-compiler libprotobuf-dev libprotoc-dev + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: any::pkgdown, local::. + needs: website + + - name: Deploy to GitHub pages 🚀 + if: github.event_name != 'pull_request' + uses: JamesIves/github-pages-deploy-action@v4.4.1 + with: + clean: false + branch: gh-pages + folder: docs diff --git a/.gitignore b/.gitignore index 1695509f..af992a64 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ .Ruserdata TO_DO +docs diff --git a/DESCRIPTION b/DESCRIPTION index 07604b0b..f9ad8cb2 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -21,7 +21,7 @@ Imports: methods SystemRequirements: Java (>= 17) License: EUPL -URL: https://github.com/rjdemetra/rjd3toolkit +URL: https://github.com/rjdemetra/rjd3toolkit, https://rjdemetra.github.io/rjd3toolkit/ LazyData: TRUE Suggests: knitr, diff --git a/_pkgdown.yml b/_pkgdown.yml new file mode 100644 index 00000000..a4a61b29 --- /dev/null +++ b/_pkgdown.yml @@ -0,0 +1,4 @@ +url: https://rjdemetra.github.io/rjd3toolkit/ +template: + bootstrap: 5 +