From 6930bfeba123f0f6b9b59270d513ab1b710dac2c Mon Sep 17 00:00:00 2001 From: Adam Howes Date: Wed, 15 May 2024 10:40:54 +0100 Subject: [PATCH] Issue 26: Create CI for GitHub pages website (#31) * Run use_pkgdown_github_pages() * Revert version roll back * Remove "master" branch * Add pkgdown and enwtheme dependencies for website * Remove whitespace (?) * Add bookdown to Suggests --- .github/.gitignore | 1 + .github/workflows/pkgdown.yaml | 13 ++++++++++--- DESCRIPTION | 7 ++++++- _pkgdown.yml | 3 +-- 4 files changed, 18 insertions(+), 6 deletions(-) create mode 100644 .github/.gitignore diff --git a/.github/.gitignore b/.github/.gitignore new file mode 100644 index 000000000..2d19fc766 --- /dev/null +++ b/.github/.gitignore @@ -0,0 +1 @@ +*.html diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index d84188ce6..931c5f60a 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -1,13 +1,18 @@ -# Workflow derived from https://github.com/r-lib/actions/tree/master/examples +# 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: [main] - tags: ['*'] + pull_request: + branches: [main] + release: + types: [published] workflow_dispatch: - + name: pkgdown +permissions: read-all + jobs: pkgdown: runs-on: ubuntu-latest @@ -16,6 +21,8 @@ jobs: group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }} env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + permissions: + contents: write steps: - uses: actions/checkout@v4 diff --git a/DESCRIPTION b/DESCRIPTION index ca39de3a6..6bb1ca38d 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -29,11 +29,16 @@ Imports: ggplot2, posterior, purrr -Suggests: +Suggests: + bookdown, epinowcast, testthat (>= 3.0.0) Remotes: stan-dev/cmdstanr, Rdatatable/data.table, epinowcast/epinowcast +Config/Needs/website: + r-lib/pkgdown, + epinowcast/enwtheme Config/testthat/edition: 3 +URL: https://epidist.epinowcast.org/ diff --git a/_pkgdown.yml b/_pkgdown.yml index d63a2419c..60083c4b7 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -1,4 +1,4 @@ -url: epidist.epinowcast.org/ +url: https://epidist.epinowcast.org/ template: package: enwtheme @@ -30,4 +30,3 @@ reference: desc: Functions and helper functions for plotting contents: - has_concept("plot") - \ No newline at end of file