Skip to content

Commit

Permalink
add gh action for publishing dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
rpodcast committed Mar 17, 2024
1 parent 67aebf7 commit 6b7a129
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/publish.yml
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 }}

0 comments on commit 6b7a129

Please sign in to comment.