Render QMD Files #111
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
name: Render QMD Files | |
on: | |
workflow_dispatch: # This allows the action to be run manually from the Actions tab | |
schedule: | |
- cron: '0 0 * * *' # This runs the action every day at midnight | |
jobs: | |
render: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
with: | |
token: ${{ secrets.TYLER_PAT }} # Use your PAT instead of GITHUB_TOKEN for checkout | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.11 | |
- name: Install Python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Load and wrangle data | |
run: python stories/example_story/wrangle_data.py | |
- name: Set up R | |
uses: r-lib/actions/setup-r@v1 | |
- name: Install Quarto | |
run: | | |
install.packages('remotes') | |
remotes::install_github('quarto-dev/quarto-cli') | |
- name: Render QMD files | |
run: | | |
find stories_name -name "docs/*.qmd" -exec Rscript -e "quarto::render('{}')" \; | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.TYLER_PAT }} # Use your PAT for the push operation | |
publish_dir: ./_site |