generated from jhudsl/OTTR_Template_Website
-
Notifications
You must be signed in to change notification settings - Fork 0
110 lines (95 loc) · 3.42 KB
/
refresh-data.yaml
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
name: Refresh All
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 0'
jobs:
refresh-all:
name: Refresh All
runs-on: ubuntu-latest
container:
image: cansav09/metricminer
yaml-check:
name: Load user automation choices
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
# Use the yaml-env-action action.
- name: Load environment from YAML
uses: doughepi/[email protected]
with:
files: config_automation.yml # Pass a space-separated list of configuration files. Rightmost files take precedence.
outputs:
toggle_calendly: "${{ env.RENDER_CALENDLY }}"
toggle_ga: "${{ env.RENDER_GA }}"
toggle_github: "${{ env.RENDER_GITHUB }}"
toggle_googleforms: "${{ env.RENDER_GOOGLEFORMS }}"
toggle_slido: "${{ env.RENDER_SLIDO }}"
toggle_youtube: "${{ env.RENDER_YOUTUBE }}"
rendering_docker_image: "${{ env.RENDERING_DOCKER_IMAGE }}"
render-calendly:
name: Render Calendly
needs: yaml-check
runs-on: ubuntu-latest
container:
image: ${{needs.yaml-check.outputs.rendering_docker_image}}
if: ${{needs.yaml-check.outputs.toggle_calendly == 'yes'}}
steps:
- name: Refresh Google Analytics
env:
METRICMINER_CALENDLY: ${{ secrets.METRICMINER_CALENDLY }}
run: Rscript refresh-data/refresh-calendly.R
render-ga:
name: Render Google Analytics
needs: yaml-check
runs-on: ubuntu-latest
container:
image: ${{needs.yaml-check.outputs.rendering_docker_image}}
if: ${{needs.yaml-check.outputs.toggle_ga == 'yes'}}
steps:
- name: Refresh Google Analytics
env:
METRICMINER_GOOGLE_ACCESS: ${{ secrets.METRICMINER_GOOGLE_ACCESS }}
METRICMINER_GOOGLE_REFRESH: ${{ secrets.METRICMINER_GOOGLE_REFRESH }}
run: Rscript refresh-data/refresh-ga.R
render-github:
name: Render Github
needs: yaml-check
runs-on: ubuntu-latest
container:
image: ${{needs.yaml-check.outputs.rendering_docker_image}}
if: ${{needs.yaml-check.outputs.toggle_github == 'yes'}}
steps:
- name: Refresh Github
env:
METRICMINER_GITHUB_PAT: ${{ secrets.METRICMINER_GITHUB_PAT }}
METRICMINER_GOOGLE_ACCESS: ${{ secrets.METRICMINER_GOOGLE_ACCESS }}
METRICMINER_GOOGLE_REFRESH: ${{ secrets.METRICMINER_GOOGLE_REFRESH }}
run: Rscript refresh-data/refresh-github.R
refresh-googleforms:
name: Render Google Forms
needs: yaml-check
runs-on: ubuntu-latest
container:
image: ${{needs.yaml-check.outputs.rendering_docker_image}}
if: ${{needs.yaml-check.outputs.toggle_googleforms == 'yes'}}
steps:
- name: Refresh Google Forms
env:
METRICMINER_GOOGLE_ACCESS: ${{ secrets.METRICMINER_GOOGLE_ACCESS }}
METRICMINER_GOOGLE_REFRESH: ${{ secrets.METRICMINER_GOOGLE_REFRESH }}
run: Rscript refresh-data/refresh-googleforms.R
refresh-slido:
name: Render Slido
needs: yaml-check
runs-on: ubuntu-latest
container:
image: ${{needs.yaml-check.outputs.rendering_docker_image}}
if: ${{needs.yaml-check.outputs.toggle_slido == 'yes'}}
steps:
- name: Refresh Slido
env:
METRICMINER_GOOGLE_ACCESS: ${{ secrets.METRICMINER_GOOGLE_ACCESS }}
METRICMINER_GOOGLE_REFRESH: ${{ secrets.METRICMINER_GOOGLE_REFRESH }}
run: Rscript refresh-data/refresh-slido.R