Skip to content

Commit

Permalink
Add github action for pkgdown (#172)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrnold authored Feb 9, 2024
1 parent ff59831 commit 9ad8ccc
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 25 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@
^\.pre-commit-config\.yaml$
^CRAN-SUBMISSION$
^scripts$
^pkgdown$
48 changes: 48 additions & 0 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# 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:

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@v4

- 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: any::pkgdown, local::.
needs: website

- 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ inst/doc
README.html
revdep
*.DS_Store
docs
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Description: Some extra themes, geoms, and scales for 'ggplot2'.
'Excel', and 'The Wall Street Journal', among others.
Provides 'geoms' for Tufte's box plot and range frame.
License: GPL-2
URL: https://jrnold.github.io/ggthemes/, https://github.com/jrnold/ggthemes
URL: https://jrnold.github.io/ggthemes/, https://github.com/jrnold/ggthemes, http://jrnold.github.io/ggthemes/
BugReports: https://github.com/jrnold/ggthemes/issues
RoxygenNote: 7.3.1
LazyData: true
Expand Down
38 changes: 14 additions & 24 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,30 @@
url: http://jrnold.github.io/ggthemes/
template:
bootstrap: 5

reference:
- title: Themes
contents:
- starts_with("theme_")
- title: "Color Scales"
desc: >-
Provided ggplot2 scales for the `color` (`colour`) aesthetic.
Scales control the details of how data values are translated to visual
properties.
contents: starts_with("theme_")
- title: Color Scales
desc: Provided ggplot2 scales for the `color` (`colour`) aesthetic. Scales control
the details of how data values are translated to visual properties.
contents:
- starts_with("scale_color_")
- starts_with("scale_fill_")
- title: Shape Scales
desc: >-
Provided ggplot2 scales for the `shape` aesthetic.
Scales control the details of how data values are translated to visual
properties.
contents:
- starts_with("scale_shape_")
desc: Provided ggplot2 scales for the `shape` aesthetic. Scales control the details
of how data values are translated to visual properties.
contents: starts_with("scale_shape_")
- title: Lintetype Scales
desc: >-
Provided ggplot2 scales for the `linetype` aesthetic.
Scales control the details of how data values are translated to visual
properties.
contents:
- starts_with("scale_linetype_")
desc: Provided ggplot2 scales for the `linetype` aesthetic. Scales control the details
of how data values are translated to visual properties.
contents: starts_with("scale_linetype_")
- title: Color, Shape, and Linetype Palettes
desc: >-
Color, shape, and linetype palettes.
desc: Color, shape, and linetype palettes.
contents:
- ends_with("_pal")
- palette_pander
- title: Geoms and Stats
desc: >-
ggplot2 geom and stat layers.
desc: ggplot2 geom and stat layers.
contents:
- starts_with("geom_")
- starts_with("stat_")
Expand All @@ -50,3 +39,4 @@ reference:
contents:
- ggthemes_data
- canva_palettes

0 comments on commit 9ad8ccc

Please sign in to comment.