generated from rpodcast/r_dev_projects
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add gh action for publishing dashboard
- Loading branch information
Showing
1 changed file
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
on: | ||
push: | ||
branches: [main] | ||
schedule: | ||
- cron: "5 9 * * 0" | ||
workflow_dispatch: | ||
|
||
name: Quarto Publish | ||
|
||
jobs: | ||
build-deploy: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install jq for parsing system dependencies | ||
id: install-jq-step | ||
uses: awalsh128/cache-apt-pkgs-action@latest | ||
with: | ||
packages: jq | ||
version: 1.0 | ||
|
||
- name: Install system dependencies | ||
id: install-deps-step | ||
uses: awalsh128/cache-apt-pkgs-action@latest | ||
env: | ||
DEPS_ENV: ${{ steps.parse-dep-step.DEPS_ENV }} | ||
with: | ||
packages: libarchive-dev libcurl4-openssl-dev libssl-dev make | ||
|
||
- name: Setup r2u | ||
id: r2u-step | ||
uses: eddelbuettel/github-actions/r2u-setup@master | ||
|
||
- name: SessionInfo | ||
id: sessioninfo-step | ||
run: R -q -e 'sessionInfo()' | ||
|
||
- name: Install deps R package | ||
id: r-pkg-deps-step | ||
run: Rscript -e 'install.packages("deps")' | ||
|
||
- name: Package Dependencies | ||
id: r-package-dependencies-step | ||
# takes advantage of r2u to install the named CRAN packages as binaries | ||
# in the r2u context we could also use script 'install.r' | ||
#run: Rscript -e 'install.packages(c("tinyspotifyr", "ggplot2", "anytime", "data.table", "tinythemes"))' | ||
run: Rscript -e 'deps::install()' | ||
|
||
- name: Set up Quarto | ||
uses: quarto-dev/quarto-actions/setup@v2 | ||
|
||
- name: Render and Publish | ||
uses: quarto-dev/quarto-actions/publish@v2 | ||
with: | ||
target: gh-pages | ||
path: quarto_dashboard | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |