Exploristics
This presentation is learn how to carry out a the automated deployment of an R package website when files are changed to GitHub. This code deployment pipeline can be considered as generic to apply to the following other use-cases:
Deploying a shinyapp
Deploying a dashboard
Updating a datasource
By the end of this presentation
Centralized Documentation: pkgdown provides a centralized location for all your package’s documentation, vignettes, and function references. This makes it easier for users to find and navigate through information about your package.
Promotion and Visibility: Having a dedicated website increases the visibility of your package. Users can discover it through web searches, and having clear documentation can attract more users and contributors.
Automatic Generation: pkgdown automates the process of creating a website from your package documentation. It extracts information from your package’s metadata and generates web pages, reducing manual effort.
Professional Appearance: The generated website has a professional appearance with consistent styling and navigation, which enhances the overall user experience.
User Engagement: A well-organized and informative website encourages user engagement. Users can quickly find the information they need, understand how to use your package effectively, and contribute to its development.
Easy eh?
For this to work seamlessly you need to have developed an R-package in a standard format, adhering to best practice and coding conventions…but when you do this you have access to a host of tools and resources!
Readme file
Description file
Code documentation (roxygen2)
Vignettes
News file (Change log)
flowchart LR
subgraph Automated Pipeline
direction LR
A(Write Code)<-. code review .-> B[Github]
B -. change detected .-> C(Recompile html)
C -. deploy files .-> D{Website}
click B href "https://github.com/GABurns/ExploristicsTheme" _blank
click D href "http://exploristic.theme.s3-website-eu-west-1.amazonaws.com/index.html" _blank
end
But it works on my machine…
Missing dependencies1
Change of permissions
Syntax errors
Files in wrong location (relative position)
Took failed 24 builds before first success!
flowchart TB
subgraph AWS CodeBuild
direction LR
A{Code Source} --> B(Webhook)
B --> C(Filter)
C --> D[Build Environment]
D -.->|BuildSpec| E{{Install}}
E -.- F{{Pre-build}}
F -.- G{{Build}}
G -.-> H{{Deploy}}
end