Update Research Statistics #1
This file contains hidden or 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: Update Research Statistics | |
| on: | |
| schedule: | |
| # Runs at 06:00 UTC on the 1st of every month | |
| - cron: '0 6 1 * *' | |
| workflow_dispatch: # Allow manual trigger from GitHub UI | |
| permissions: | |
| contents: write | |
| jobs: | |
| render-site: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup R | |
| uses: r-lib/actions/setup-r@v2 | |
| with: | |
| r-version: 'release' | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libcurl4-openssl-dev libssl-dev libxml2-dev | |
| - name: Install R packages | |
| uses: r-lib/actions/setup-r-dependencies@v2 | |
| with: | |
| packages: | | |
| any::cranlogs | |
| any::scholar | |
| any::plotly | |
| any::dplyr | |
| any::htmltools | |
| any::knitr | |
| any::rmarkdown | |
| any::jsonlite | |
| any::yaml | |
| - name: Setup Quarto | |
| uses: quarto-dev/quarto-actions/setup@v2 | |
| - name: Render site | |
| run: quarto render | |
| - name: Commit and push updated site | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add docs/ | |
| git diff --staged --quiet || git commit -m "Update research statistics (monthly auto-build)" | |
| git push |