From 1bcb50e7eab974ef8363001f0c36e79c549cf1bd Mon Sep 17 00:00:00 2001 From: Martin HA Date: Wed, 27 Nov 2024 19:28:09 +0000 Subject: [PATCH] Add render github action --- .github/workflows/render-quarto.yml | 29 +++++++++++++++++++++++++++++ .gitignore | 4 ++-- README.md | 7 ++++++- 3 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/render-quarto.yml diff --git a/.github/workflows/render-quarto.yml b/.github/workflows/render-quarto.yml new file mode 100644 index 0000000..2697e97 --- /dev/null +++ b/.github/workflows/render-quarto.yml @@ -0,0 +1,29 @@ +name: Render and Deploy Quarto Document + +on: + push: + branches: + - main + +jobs: + render: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Set up Quarto + uses: quarto-dev/quarto-actions/setup@v2 + + - name: Install include-code-files extension + run: quarto add quarto-ext/include-code-files + + - name: Render Quarto document + run: quarto render functions.qmd --output-dir ./docs + + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./docs \ No newline at end of file diff --git a/.gitignore b/.gitignore index da2f41f..3cb00eb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ _extensions -*_files/libs -*.html \ No newline at end of file +docs +/.quarto/ diff --git a/README.md b/README.md index 31d81a9..c27b9ee 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,11 @@ +# R Functions +A beginner-friendly introduction to R functions. -## Rendering +Example scripts are provided in the `R` directory. + + +## Rendering Slides Locally 1. Install [R](https://www.r-project.org/) and [Quarto](https://quarto.org/docs/get-started/).