Skip to content

Commit

Permalink
Updated to quarto
Browse files Browse the repository at this point in the history
  • Loading branch information
royfrancis committed Sep 13, 2023
1 parent 2ef22f4 commit e534a10
Show file tree
Hide file tree
Showing 527 changed files with 41,546 additions and 7,436 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ on:
push:
branches:
- master
- quarto
env:
REGISTRY: ghcr.io
ORG: nbisweden
IMAGE: workshop-base:latest
IMAGE: workshop-ngsintro:latest

jobs:
rmd-render-job:
runs-on: ubuntu-20.04
runs-on: ubuntu-21.04
steps:
- name: Set time zone
uses: szenius/[email protected]
Expand All @@ -19,7 +20,7 @@ jobs:
timezoneMacos: "Europe/Stockholm"
timezoneWindows: "W. Europe Standard Time"
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Pull image
run: docker pull ${{ env.REGISTRY }}/${{ env.ORG }}/${{ env.IMAGE }}
- name: Define variables
Expand All @@ -30,7 +31,7 @@ jobs:
echo "REPO=$(basename ${GITHUB_REPOSITORY})" >> $GITHUB_ENV
- name: Check docker and variables
run: |
docker run --rm -u $(id -u ${USER}):$(id -g ${USER}) -v ${PWD}:/rmd ${{ env.REGISTRY }}/${{ env.ORG }}/${{ env.IMAGE }} Rscript -e "print('R in docker works!')"
docker run --rm -u $(id -u ${USER}):$(id -g ${USER}) -v ${PWD}:/qmd ${{ env.REGISTRY }}/${{ env.ORG }}/${{ env.IMAGE }} Rscript -e "print('R in docker works!')"
echo "GITHUB_ACTOR: ${GITHUB_ACTOR}"
echo "GITHUB_REPOSITORY: ${GITHUB_REPOSITORY}"
echo "REPO: ${REPO}"
Expand All @@ -52,11 +53,11 @@ jobs:
# Render website
echo "Rendering Rmd files ..."
docker run --rm -u $(id -u ${USER}):$(id -g ${USER}) -v ${PWD}:/rmd ${{ env.REGISTRY }}/${{ env.ORG }}/${{ env.IMAGE }}
docker run --rm -u $(id -u ${USER}):$(id -g ${USER}) -v ${PWD}:/qmd ${{ env.REGISTRY }}/${{ env.ORG }}/${{ env.IMAGE }}
# Generate PDFs
cd ${PATH_EXPORT}
echo "Generating PDFs ..."
docker run --rm -u $(id -u ${USER}):$(id -g ${USER}) -v ${PWD}:/rmd ${{ env.REGISTRY }}/${{ env.ORG }}/${{ env.IMAGE }} Rscript -e "l <- list.files('.',pattern='slide.+html');if(length(l)!=0) {for(i in 1:length(l)) pagedown::chrome_print(l[i],extra_args=c('--no-sandbox','--disable-dev-shm-usage','--disable-gpu'))};"
docker run --rm -u $(id -u ${USER}):$(id -g ${USER}) -v ${PWD}:/qmd ${{ env.REGISTRY }}/${{ env.ORG }}/${{ env.IMAGE }} Rscript -e "l <- list.files('.',pattern='slide.+html');if(length(l)!=0) {for(i in 1:length(l)) pagedown::chrome_print(l[i],extra_args=c('--no-sandbox','--disable-dev-shm-usage','--disable-gpu'))};"
cd ..
# Render canvas version of website by changing _site.yml
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,9 @@
libs/
*_files/
*.html
to-do.md
*.code-workspace
/.luarc.json
/.quarto/
.DS_Store

7 changes: 7 additions & 0 deletions .quartoignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
README.md
.git
.Rhistory
preview*
docs
**/*_cache
**/*_files
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ git push origin

If you are not added as a collaborator, first fork this repo to your account, then clone it locally, make changes, commit, push to your repo, then submit a pull request to this repo.

:exclamation: When updating repo for a new course, change `output_dir: XXXX` in `_site.yml` as the first thing, so that old rendered files are not overwritten.
:exclamation: When updating repo for a new course, change `output_dir: XXXX` in `_quarto.yml` as the first thing, so that old rendered files are not overwritten.

:exclamation: Do not push any rendered .html files or intermediates.

Expand Down
7 changes: 7 additions & 0 deletions _extensions/quarto-ext/fontawesome/_extension.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
title: Font Awesome support
author: Carlos Scheidegger
version: 1.1.0
quarto-required: ">=1.2.269"
contributes:
shortcodes:
- fontawesome.lua
Loading

0 comments on commit e534a10

Please sign in to comment.