.github/workflows/main.yml #97
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
| on: | |
| schedule: | |
| - cron: '50 14 * * *' | |
| - cron: '50 17 * * *' | |
| workflow_dispatch: | |
| jobs: | |
| import-data: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set up R | |
| uses: r-lib/actions/setup-r@v2 | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libcurl4-openssl-dev | |
| sudo apt-get install -y libmagick++-dev | |
| sudo apt-get install -y libarchive-dev | |
| sudo apt-get install -y libgit2-dev | |
| - name: Is it Jupiter | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.x' | |
| - run: pip install jupyter | |
| - name: Check out repository | |
| uses: actions/checkout@v3 | |
| - name: Install packages via renv | |
| uses: r-lib/actions/setup-renv@v2 | |
| with: | |
| cache-version: 2 | |
| - name: Set up Quarto | |
| uses: quarto-dev/quarto-actions/setup@v2 | |
| with: | |
| tinytex: true | |
| - name: Render Quarto | |
| uses: quarto-dev/quarto-actions/render@v2 | |
| - name: Commit results | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| git config --local user.email "actions@github.com" | |
| git config --local user.name "GitHub Actions" | |
| git add . | |
| git commit -m 'Data updated' || echo "No changes to commit" | |
| git push origin || echo "No changes to commit" |