Dashboard works :-) #154
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: Update and Deploy Cuneo Analysis | |
on: | |
#schedule: | |
# - cron: '*/10 * * * *' # Every 10 minutes | |
push: | |
branches: | |
- main # Trigger on push to main branch | |
jobs: | |
update-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up R | |
uses: r-lib/actions/setup-r@v2 | |
- name: Install R packages | |
run: | | |
R -e "options(repos = c(openvolley = 'https://openvolley.r-universe.dev', CRAN = 'https://cloud.r-project.org'))" | |
R -e "install.packages('ovlytics')" | |
R -e "install.packages('datavolley', version = '1.7.3', repos = c('https://openvolley.r-universe.dev', 'https://cloud.r-project.org'))" | |
R -e "install.packages(c('ggplot2', 'dplyr', 'plotly', 'scales'))" | |
- name: Run R script to update analysis | |
run: | | |
Rscript Backend/Cuneo.R | |
- name: Commit and push changes | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "Rkomi98" | |
git add -A | |
git commit -m "Automated update of analysis" | |
git push | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |