Skip to content

Commit

Permalink
Merge pull request #30 from OxfordIHTM/dev
Browse files Browse the repository at this point in the history
add pkgdown website and deploy workflow
  • Loading branch information
ernestguevarra authored Apr 29, 2024
2 parents bcbd86f + eeae265 commit a559353
Show file tree
Hide file tree
Showing 19 changed files with 139 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@
^\.github$
^CODE_OF_CONDUCT\.md$
^codecov\.yml$
^_pkgdown\.yml$
^docs$
^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/github-pages-deploy-action@v4.5.0
with:
clean: false
branch: gh-pages
folder: docs
1 change: 0 additions & 1 deletion .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ jobs:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

steps:
- uses: actions/checkout@v4
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
.Rhistory
.RData
.Ruserdata
docs
2 changes: 2 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,6 @@ Language: en-GB
LazyData: true
RoxygenNote: 7.3.1
Roxygen: list(markdown = TRUE)
URL: https://github.com/OxfordIHTM/codeditr, http://oxford-ihtm.io/codeditr/
Config/testthat/edition: 3

4 changes: 4 additions & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
url: http://oxford-ihtm.io/codeditr/
template:
bootstrap: 5

3 changes: 0 additions & 3 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
comment: false

codecov:
token: ${{ secrets.CODECOV_TOKEN }}

coverage:
status:
project:
Expand Down
1 change: 1 addition & 0 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
CMD
CoDEdit
CodeFactor
Codecov
DD
FreeId
Expand Down
8 changes: 8 additions & 0 deletions man/codeditr.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

72 changes: 72 additions & 0 deletions pkgdown/_pkgdown.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
title: codeditr

url: https://oxford-ihtm.io/codeditr/

development:
mode: auto

template:
bootstrap: 5
bootswatch: litera
theme: haddock
ganalytics: #

home:
links:
- text: Read more about the International Classification of Diseases
href: https://www.who.int/standards/classifications/classification-of-diseases
- text: Read more about the WHO CoDEdit tool
href: https://www.who.int/standards/classifications/classification-of-diseases/services/codedit-tool

navbar:
bg: primary
type: light
structure:
left: [home, intro, reference, articles, news]
right: [twitter, facebook, linkedin, github]

components:
# articles:
# text: Articles
# menu:
# - text: "ICD-11 Foundation"
# href: articles/icd11_foundation.html
twitter:
icon: "fab fa-twitter fa-lg"
href: http://twitter.com/OxIHTM
facebook:
icon: "fab fa-facebook fa-lg"
href: https://www.facebook.com/MSc-in-International-Health-and-Tropical-Medicine-University-of-Oxford-433056700228246/
linkedin:
icon: "fab fa-linkedin fa-lg"
href: https://www.linkedin.com/company/international-health-and-tropical-medicine


reference:
- title: Description
contents:
- codeditr-package

- title: Recode
contents:
- cod_recode_sex
- cod_recode_age_type

- title: Calculate
contents:
- cod_calculate_age

- title: Check
contents:
- cod_check_age
- cod_check_missing

- title: Utilities
contents:
- get_age_values

- title: Supporting datasets
contents:
- icd10_example
- icd11_example

Binary file added pkgdown/favicon/apple-touch-icon-120x120.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pkgdown/favicon/apple-touch-icon-152x152.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pkgdown/favicon/apple-touch-icon-180x180.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pkgdown/favicon/apple-touch-icon-60x60.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pkgdown/favicon/apple-touch-icon-76x76.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pkgdown/favicon/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pkgdown/favicon/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pkgdown/favicon/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pkgdown/favicon/favicon.ico
Binary file not shown.

0 comments on commit a559353

Please sign in to comment.