Skip to content

Commit

Permalink
fix pkgdown
Browse files Browse the repository at this point in the history
  • Loading branch information
vidonne committed Aug 22, 2023
1 parent e45a38a commit 0a0fa72
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 17 deletions.
35 changes: 24 additions & 11 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# 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, master]
pull_request:
branches: [main, master]
release:
types: [published]
workflow_dispatch:
Expand All @@ -12,24 +14,35 @@ 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@v2
- uses: actions/checkout@v3

- uses: r-lib/actions/setup-pandoc@v1
- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v1
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v1
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: pkgdown
extra-packages: any::pkgdown, local::.
needs: website

- name: Deploy package
run: |
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "[email protected]"
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'
- name: Build site
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
shell: Rscript {0}

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/[email protected]
with:
clean: false
branch: gh-pages
folder: docs
6 changes: 2 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ Authors@R:
Description: Color palettes and themes for plots based on UNHCR brand book.
License: MIT + file LICENSE
Encoding: UTF-8
URL: https://github.com/vidonne/unhcrthemes,
https://vidonne.github.io/unhcrthemes/
URL: https://github.com/vidonne/unhcrthemes, https://vidonne.github.io/unhcrthemes/, https://unhcr-dataviz.github.io/unhcrthemes/
BugReports: https://github.com/vidonne/unhcrthemes/issues
Depends:
R (>= 3.5)
Expand All @@ -38,7 +37,6 @@ Suggests:
lubridate,
tidyverse
VignetteBuilder: knitr
Config/Needs/website:
vidonne/unhcrtemplate
Config/Needs/website: unhcrtemplate
Config/testthat/edition: 3
LazyData: true
3 changes: 1 addition & 2 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
url: https://vidonne.github.io/unhcrthemes/
url: https://unhcr-dataviz.github.io/unhcrthemes/
template:
package: unhcrtemplate
bootstrap: 5

0 comments on commit 0a0fa72

Please sign in to comment.