Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
debbieargueta3 authored Oct 3, 2023
0 parents commit 3fe9bb2
Show file tree
Hide file tree
Showing 4 changed files with 122 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/render.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
on: push
name: Check Render
jobs:
check-renders:
runs-on: ubuntu-latest
container:
image: ghcr.io/sta523-fa22/sta523-base:latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Missing Packages
run: |
missing = checklist::missing_pkgs(dir = "./", glob = "submit.qmd")
if(length(missing)){
install.packages("pak")
pak::pkg_install(missing, dependencies = TRUE)
}
shell: Rscript {0}
- name: Check Renders
run: |
checklist::check_qmd_renders("submit.qmd")
shell: Rscript {0}
- name: Create artifacts
uses: actions/upload-artifact@v3
with:
name: submit-html
path: submit.html
55 changes: 55 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# History files
.Rhistory
.Rapp.history

# Session Data files
.RData
.RDataTmp

# User-specific files
.Ruserdata

# Example code in package build process
*-Ex.R

# Output files from R CMD build
/*.tar.gz

# Output files from R CMD check
/*.Rcheck/

# RStudio files
.Rproj.user/

# produced vignettes
vignettes/*.html
vignettes/*.pdf

# OAuth2 token, see https://github.com/hadley/httr/releases/tag/v0.3
.httr-oauth

# knitr and R markdown default cache directories
*_cache/
/cache/

# Temporary files created by R markdown
*.utf8.md
*.knit.md

# R Environment Variables
.Renviron

# pkgdown site
docs/

# translation temp files
po/*~

# RStudio Connect folder
rsconnect/

data/

# Mac artifacts
**/.DS_Store

12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Example Assignment

This repository includes a GitHub Actions workflow that will automatically look for a file named `submit.qmd` and render it to an HTML document. You can include as many other files as you want, but only `submit.qmd` will trigger the workflow.

When the workflow runs successfully, you can view the final HTML product by going to the "Actions" tab, clicking on the most recent run, and downloading the `submit-html` file under "Artifacts."

If you want to track whether or not your assignment has rendered successfully, add the below line of code to the `README.md` file. Just change the URL to include your GitHub username and the name of your repository:

```md
![status](https://github.com/<USERNAME>/<REPOSITORY>/actions/workflows/render.yml/badge.svg)
```

28 changes: 28 additions & 0 deletions submit.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
title: ""
author: ""
format:
html:
embed-resources: true
---

## Quarto

Quarto enables you to weave together content and executable code into a finished document. To learn more about Quarto see <https://quarto.org>.

## Running Code

When you click the **Render** button a document will be generated that includes both content and the output of embedded code. You can embed code like this:

```{r}
1 + 1
```

You can add options to executable code like this

```{r}
#| echo: false
2 * 2
```

The `echo: false` option disables the printing of code (only output is displayed).

0 comments on commit 3fe9bb2

Please sign in to comment.