Skip to content

Commit 531341e

Browse files
committed
Add pkgdown to CI jobs.
1 parent 207b6b9 commit 531341e

File tree

6 files changed

+161
-11
lines changed

6 files changed

+161
-11
lines changed

.Rbuildignore

+17-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,23 @@
1+
^doc$
2+
^Meta$
3+
^CRAN-RELEASE$
14
^.*\.Rproj$
25
^\.Rproj\.user$
3-
^\.travis\.yml$
4-
^\.gitlab-ci\.yml$
5-
^LICENCE$
6-
^LICENSE\.R?md$
76
^README\.R?md$
87
^README-.*\.(png|jpg|jpeg|pdf)$
9-
^inst/tests/.*$
8+
^README_files/.*$
9+
^LICENCE$
10+
^LICENSE\.R?md$
11+
^\.travis\.yml$
12+
^\.gitlab-ci\.yml$
13+
^raw_data/.*$
14+
^prep_tools/.*$
15+
^cran-comments\.md$
16+
^\.github$
17+
^_pkgdown\.yml$
18+
^docs$
19+
^pkgdown$
20+
^foo/.*$
21+
^CRAN-SUBMISSION$
1022
^app\.R$
1123
^\.github$

.github/workflows/pkgdown.yaml

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
2+
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
branches: [main, master]
8+
release:
9+
types: [published]
10+
workflow_dispatch:
11+
12+
name: pkgdown
13+
14+
permissions: read-all
15+
16+
jobs:
17+
pkgdown:
18+
runs-on: ubuntu-latest
19+
# Only restrict concurrency for non-PR jobs
20+
concurrency:
21+
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
22+
env:
23+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
24+
permissions:
25+
contents: write
26+
steps:
27+
- uses: actions/checkout@v4
28+
29+
- uses: r-lib/actions/setup-pandoc@v2
30+
31+
- uses: r-lib/actions/setup-r@v2
32+
with:
33+
use-public-rspm: true
34+
35+
- uses: r-lib/actions/setup-r-dependencies@v2
36+
with:
37+
extra-packages: any::pkgdown, local::.
38+
needs: website
39+
40+
- name: Build site
41+
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
42+
shell: Rscript {0}
43+
44+
- name: Deploy to GitHub pages 🚀
45+
if: github.event_name != 'pull_request'
46+
uses: JamesIves/[email protected]
47+
with:
48+
clean: false
49+
branch: gh-pages
50+
folder: docs

.gitignore

+49-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,54 @@
1-
*.Rproj
1+
#
2+
# RStudio project files
3+
#
24
.Rproj.user/
5+
*.Rproj
6+
7+
#
8+
# R files
9+
#
310
.Rhistory
411
.RData
512
.Ruserdata
6-
~*.xls*
7-
~*.doc*
8-
.Rproj.user
913

14+
#
15+
# R package generated files
16+
#
17+
inst/doc
18+
docs/
19+
doc
20+
Meta
21+
22+
#
23+
# Backup files
24+
#
25+
*.bak
26+
27+
#
28+
# LaTeX files
29+
#
30+
*.aux
31+
*.bbl
32+
*.glo
33+
*.gls
34+
*.glg
35+
*.idx
36+
*.ilg
37+
*.lof
38+
*.log
39+
*.lot
40+
*.toc
41+
*.out
42+
*.synctex.gz
43+
44+
#
45+
# Office temp files
46+
#
47+
~$*
48+
*~
49+
*.tmp
50+
51+
/foo/
52+
/CRAN-RELEASE
53+
/doc/
54+
/Meta/

README.Rmd

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ gh_url <- httr::build_url(purl)
2020
<!-- badges: start -->
2121
[![CRAN Status Badge](https://www.r-pkg.org/badges/version-last-release/kayaExplorer)](https://cran.r-project.org/package=kayaExplorer)
2222
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
23-
[![R-CMD-check](https://github.com/jonathan-g/kaya-explorer/workflows/R-CMD-check/badge.svg)](https://github.com/jonathan-g/kayaExplorer/actions)
23+
[![R-CMD-check](https://github.com/jonathan-g/kaya-explorer/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/jonathan-g/kaya-explorer/actions/workflows/R-CMD-check.yaml)
24+
[![pkgdown](https://github.com/jonathan-g/kaya-explorer/actions/workflows/pkgdown.yaml/badge.svg)](https://github.com/jonathan-g/kaya-explorer/actions/workflows/pkgdown.yaml)
2425
**GitLab:** [![Build Status](https://gitlab.jgilligan.org/gilligan_teaching/ees_3310/ees_3310_software/kaya-explorer/badges/main/build.svg)](https://gitlab.jgilligan.org/gilligan_teaching/ees_3310/ees_3310_software/kaya-explorer/commits/main)
2526
<!-- badges: end -->
2627

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
Badge](https://www.r-pkg.org/badges/version-last-release/kayaExplorer)](https://cran.r-project.org/package=kayaExplorer)
77
[![License:
88
MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
9-
[![R-CMD-check](https://github.com/jonathan-g/kaya-explorer/workflows/R-CMD-check/badge.svg)](https://github.com/jonathan-g/kayaExplorer/actions)
9+
[![R-CMD-check](https://github.com/jonathan-g/kaya-explorer/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/jonathan-g/kaya-explorer/actions/workflows/R-CMD-check.yaml)
10+
[![pkgdown](https://github.com/jonathan-g/kaya-explorer/actions/workflows/pkgdown.yaml/badge.svg)](https://github.com/jonathan-g/kaya-explorer/actions/workflows/pkgdown.yaml)
1011
**GitLab:** [![Build
1112
Status](https://gitlab.jgilligan.org/gilligan_teaching/ees_3310/ees_3310_software/kaya-explorer/badges/main/build.svg)](https://gitlab.jgilligan.org/gilligan_teaching/ees_3310/ees_3310_software/kaya-explorer/commits/main)
1213
<!-- badges: end -->

_pkgdown.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
destination: docs
2+
url: https://jonathan-g.github.io/kaya-explorer
3+
4+
home:
5+
title: Kaya Identity Data for Nations and Regions
6+
description: >
7+
A Shiny-based explorer for Kaya identity. Loads data from the kayadata
8+
package and provides an interactive shiny app for exploring the data:
9+
choose a country or region and examine trends in the Kaya variables
10+
(population, gross domestic product, primary energy consumption, and
11+
carbon dioxide emissions), compare historical trends to the implied trends
12+
necessary to hit decarbonization policy targets (e.g., 70% reduction of
13+
emissions by 2050). Also allows the user to explore the fuel mix that
14+
different countries and regions use to supply their energy needs.
15+
strip_header: false
16+
17+
authors:
18+
Jonathan Gilligan:
19+
href: https://www.jonathangilligan.org
20+
21+
development:
22+
mode: auto
23+
24+
reference:
25+
- title: Interactive Shiny app
26+
desc: Interactive app to explore Kaya identity data and its implications for
27+
climate policy.
28+
contents:
29+
- launch_kaya_explorer
30+
- kaya_app
31+
- title: Utility functions
32+
desc: Miscellaneous utility functions
33+
contents:
34+
- set_debug
35+
- c_to_co2
36+
- co2_to_c
37+
- title: internal
38+
contents:
39+
- kayaExplorer-package
40+
41+

0 commit comments

Comments
 (0)