Quarto Publish #48
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: Quarto Publish | |
on: | |
workflow_dispatch: | |
#push: | |
#branches: main | |
schedule: | |
- cron: '0 0 1 * *' # At 00:00 on day-of-month 1 | |
jobs: | |
build-deploy: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Set up Quarto | |
uses: quarto-dev/quarto-actions/setup@v2 | |
- name: Install TinyTeX | |
run: quarto install tool tinytex --log-level warning | |
- name: Install cURL Headers | |
run: sudo apt-get install libcurl4-openssl-dev | |
- name: Install R | |
uses: r-lib/actions/setup-r@v2 | |
- name: Install R Dependencies | |
uses: r-lib/actions/setup-renv@v2 | |
with: | |
cache-version: 1 | |
- name: Run an R script to track estimates | |
run: Rscript scripts/track_estimates.R | |
- name: Commit results | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Actions" | |
git add . | |
git commit -m "Update estimates from R script" || echo "No changes to commit" | |
git push origin || echo "No changes to commit"- | |
- name: Render and Publish | |
uses: quarto-dev/quarto-actions/publish@v2 | |
with: | |
target: gh-pages | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |