Library Statistics Refresh #183
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: Library Statistics Refresh | |
on: | |
schedule: | |
- cron: '0 12 * * *' | |
push: | |
branches: | |
- main | |
jobs: | |
Running_R_scripts: | |
runs-on: ubuntu-20.04 | |
defaults: | |
run: | |
working-directory: weblate/Library Language Statistics | |
steps: | |
- name: checkout_repo | |
uses: actions/checkout@v2 | |
- uses: r-lib/actions/setup-r@v2 | |
- uses: r-lib/actions/setup-pandoc@v2 | |
- uses: r-lib/actions/setup-tinytex@v2 | |
- name: Print working directory | |
run: pwd | |
- uses: r-lib/actions/setup-r-dependencies@v2 | |
- name: Install Packages | |
run: | | |
Rscript -e 'install.packages("jsonlite")' | |
Rscript -e 'install.packages("data.table")' | |
Rscript -e 'install.packages("tibble")' | |
Rscript -e 'install.packages("utils")' | |
- name: Run R scripts | |
env: | |
WEBLATE_TOKEN: ${{ secrets.WEBLATE_TOKEN }} | |
run: | | |
Rscript "Library Language Statistics.R" | |
- name: Configure | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
- name: Commit and Push Changes | |
run: | | |
git pull origin main | |
git add . | |
git commit -m "Updated Library Csv" | |
git push |