-
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.
build: 🔧 add files to auto-build website (#4)
@arborzhang I added several files to automatically build the website. Whenever you use a new R package, you need to always run `usethis::use_package("PACKAGENAME")` (where PACKAGENAME is the package you will use), so that the website builder knows how to install and use it. Just like how you do with the UKB RAP project. In general, it's good practice to name files all lower case (it looks nicer in the URL for the website) and to always start each "chapter" (session or any file you want as a page on the website) with a single `#` header. You don't need to use the YAML header. Slides are a bit trickier. Let me know if or how you want to use them and I can help out with that. In the `_quarto.yml` file is a list of files you can add to put into the website. I'l make direct comments on them in the PR.
- Loading branch information
Showing
18 changed files
with
309 additions
and
1,180 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,42 @@ | ||
name: Build website to GitHub Pages | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
# You need these permissions to publish to GitHub pages | ||
permissions: | ||
contents: write | ||
pages: write | ||
|
||
jobs: | ||
build-deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Quarto | ||
uses: quarto-dev/quarto-actions/setup@v2 | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tinytex: false | ||
|
||
- name: Setup R | ||
uses: r-lib/actions/setup-r@v2 | ||
|
||
- name: Install R package dependencies | ||
uses: r-lib/actions/setup-r-dependencies@v2 | ||
with: | ||
cache-version: 2 | ||
|
||
- name: Publish to GitHub Pages (and render) | ||
uses: quarto-dev/quarto-actions/publish@v2 | ||
with: | ||
target: gh-pages | ||
env: | ||
# This secret is always available for github actions | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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 |
---|---|---|
@@ -1,6 +1,25 @@ | ||
# RStudio and R files | ||
.Rbuildignore | ||
.Rproj.user | ||
.Rhistory | ||
.RData | ||
.Ruserdata | ||
.DS_Store | ||
.Rdata | ||
|
||
# Temporary files | ||
*.tmp | ||
|
||
# Authentication files | ||
.httr-oauth | ||
|
||
# MacOS | ||
.DS_Store | ||
|
||
# Quarto | ||
/.quarto/ | ||
|
||
# Website generation | ||
_site | ||
_book | ||
_freeze | ||
*_files | ||
*.html | ||
|
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,20 @@ | ||
Package: ideg.mediation.course | ||
Type: Website | ||
Version: 0.1 | ||
Title: "Mediation course" | ||
Depends: | ||
R (>= 3.6.0), | ||
tidyverse | ||
Encoding: UTF-8 | ||
LazyData: true | ||
Imports: | ||
CMAverse, | ||
DiagrammeR, | ||
DiagrammeRsvg, | ||
dplyr, | ||
here, | ||
knitr, | ||
medflex, | ||
mediation, | ||
readr, | ||
rmarkdown |
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
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,34 @@ | ||
project: | ||
type: book | ||
# pre-render: quarto render slides/*.qmd | ||
# resources: | ||
# - slides/*.html | ||
|
||
book: | ||
title: "Mediation course" | ||
author: | ||
- Jie Zhang | ||
- Daniel Witte | ||
date: last-modified | ||
repo-url: https://github.com/steno-aarhus/IDEG-mediation-course | ||
site-url: https://steno-aarhus.github.io/IDEG-mediation-course | ||
chapters: | ||
- index.qmd | ||
- part: "Preamble" | ||
- part: "Sessions" | ||
chapters: | ||
- sessions/welcome.qmd | ||
- sessions/motivation.qmd | ||
- sessions/traditional-mediation-analysis.qmd | ||
appendices: | ||
- appendix/welcome.qmd | ||
page-footer: | ||
center: | ||
- text: "License: CC BY 4.0" | ||
|
||
format: html | ||
|
||
editor: | ||
markdown: | ||
wrap: 72 | ||
canonical: true |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.