-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (33 loc) · 1.2 KB
/
update.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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 }}