Skip to content

Fix: Install required Python and R packages for Quarto build #7

Fix: Install required Python and R packages for Quarto build

Fix: Install required Python and R packages for Quarto build #7

Workflow file for this run

name: Quarto Publish
on:
push:
branches:
- main # Trigger on push to main branch
workflow_dispatch: # Allows manual triggering
jobs:
build-deploy:
runs-on: ubuntu-latest
steps:
# Step 1: Checkout the repository
- uses: actions/checkout@v3
# Step 2: Set up Python
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
# Step 3: Install Python dependencies
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install jupyter nbformat psycopg2 sqlalchemy pandas numpy matplotlib
# Step 4: Set up R
- name: Set up R
uses: r-lib/actions/setup-r@v2
with:
r-version: '4.4.1'
# Step 5: Install R packages
run: |
Rscript -e 'install.packages(c("rmarkdown", "knitr"), repos="https://cloud.r-project.org/")'
# Step 6: Set up Quarto
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
# Step 7: Render the Quarto site
- name: Render Quarto site
run: quarto render
# Step 8: Deploy to GitHub Pages
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
publish_branch: gh-pages
force_orphan: true