Skip to content

Commit

Permalink
Merge 30869a8 into 730e61a
Browse files Browse the repository at this point in the history
  • Loading branch information
cansavvy authored Feb 4, 2022
2 parents 730e61a + 30869a8 commit 4907b01
Show file tree
Hide file tree
Showing 358 changed files with 161 additions and 101,696 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/render-bookdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ jobs:
jhudsl/course_template \
Rscript -e "bookdown::render_book('index.Rmd', output_format = 'all')"
# We want a fresh run of the renders each time
- name: Copy over assets
run: cp -r assets/ docs/assets/

##### If you do not wish to host your course on Coursera, you can delete this section #####
# Run Coursera version
- name: Run Coursera version of render
Expand Down
30 changes: 17 additions & 13 deletions .github/workflows/render-leanpub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ name: Render and publish Leanpub
on:
workflow_dispatch:
### UNCOMMENT THIS SECTION IF YOU WISH PREPARE YOUR COURSE FOR LEANPUB AUTOMATICALLY
# pull_request:
# branches: [ main ]
# types: [closed]
# paths:
# - '**.Rmd'
# - docker/*
# - assets/*
# - quizzes/*
# pull_request:
# branches: [ main ]
# type: [closed]
# paths:
# - '**.Rmd'
# - docker/*
# - assets/*
# - quizzes/*
######### END OF SECTION #########

jobs:
Expand All @@ -37,13 +37,17 @@ jobs:
# Run leanpub rendering
- name: Run the screenshot creation
run: |
chapt_urls=$(Rscript --vanilla scripts/get_chapter_urls.R \
chapt_urls=$(Rscript --vanilla scripts/make_screenshots.R \
--git_pat ${{ secrets.GH_PAT }} \
--repo $GITHUB_REPOSITORY)
# Run leanpub rendering
- name: Run ottr::bookdown_to_leanpub
run: Rscript -e "ottr::bookdown_to_leanpub(make_book_txt = TRUE)"
# Run Leanpub rendering
- name: Run ottr::bookdown_to_embed_leanpub
run: |
rm -r manuscript
Rscript -e "ottr::bookdown_to_embed_leanpub( \
chapt_img_key = 'resources/chapt_screen_images/chapter_urls.tsv', \
make_book_txt = TRUE)"
# Convert quizzes to Coursera format
- name: Convert quizzes to coursera
Expand All @@ -56,5 +60,5 @@ jobs:
git config --local user.name "GitHub Actions"
git add -A
git add --force manuscript/*
git commit -m 'Render leanpub' || echo "No changes to commit"
git commit -m 'Render Leanpub' || echo "No changes to commit"
git push origin main || echo "No changes to push"
Empty file modified assets/big-image.html
100644 → 100755
Empty file.
Empty file modified assets/dasl_main_image.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/dasl_main_image_short.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/dasl_thin_main_image.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/footer.html
100644 → 100755
Empty file.
Empty file modified assets/hideOutput.js
100644 → 100755
Empty file.
Empty file modified assets/itcr_arrow.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/style.css
100644 → 100755
Empty file.
Empty file modified assets/style_coursera.css
100644 → 100755
Empty file.
Empty file modified assets/thin_main_image_stripe.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/toc_close.css
100644 → 100755
Empty file.
8 changes: 4 additions & 4 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,16 @@ RUN Rscript -e "install.packages( \
'styler', \
'reticulate'))"

# Copy over git token and package list
COPY git_token.txt .
COPY github_package_list.tsv .

# cow needs this dependency:
RUN Rscript -e "devtools::install_version('gitcreds', version = '0.1.1', repos = 'http://cran.us.r-project.org')"

# Didactr needs this dependency:
RUN Rscript -e "devtools::install_version('lifecycle', version = '1.0.0', repos = 'http://cran.us.r-project.org')"

# Copy over git token and package list
COPY git_token.txt .
COPY github_package_list.tsv .

# Install packages from github
RUN Rscript install_github.R \
--packages github_package_list.tsv \
Expand Down
29 changes: 29 additions & 0 deletions docker/Dockerfile_ottr
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM jhudsl/course_template
LABEL maintainer="cansav09@gmail.com"

# Install apt-getable packages to start
RUN apt-get update && apt-get install -y --no-install-recommends apt-utils dialog

RUN apt-get install -y --no-install-recommends \
libxt6 \
libpoppler-cpp-dev \
vim \
libglpk40 \
curl \
gpg

# Install R
RUN apt-get update && apt-get install -y r-base curl

# Install R packages
RUN Rscript -e "install.packages('curl')"

# Install phantomjs
RUN apt-get update && apt-get install build-essential chrpath libssl-dev libxft-dev -y \
&& apt-get install libfontconfig1 libfontconfig1-dev -y \
&& cd ~ && export PHANTOM_JS="phantomjs-2.1.1-linux-x86_64" \
&& wget https://github.com/Medium/phantomjs/releases/download/v2.1.1/$PHANTOM_JS.tar.bz2 \
&& sudo tar xvjf $PHANTOM_JS.tar.bz2 \
&& sudo mv $PHANTOM_JS /usr/local/share \
&& sudo ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/bin \
&& phantomjs --version
17 changes: 0 additions & 17 deletions manuscript/01-intro.md

This file was deleted.

Loading

0 comments on commit 4907b01

Please sign in to comment.