forked from hackforla/live-dashboard-automation
-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (50 loc) · 1.99 KB
/
schedule_run_to_update_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
name: run main.py
on:
schedule:
- cron: '5 0-23/3 * * *' # At minute 5 past every 3rd hour starting from 12:05AM
workflow_dispatch:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout repo content
uses: actions/checkout@v3 # checkout the repository content
- name: setup python
uses: actions/setup-python@v4
with:
python-version: '3.10' # install the python version needed
- name: install python packages not in requirements.txt
run: |
python -m pip install --upgrade pip
pip install --upgrade google-auth
pip install --upgrade google-api-python-client
pip install --upgrade google-auth-httplib2
pip install --upgrade google-auth-oauthlib
pip install chardet
- name: caching Python requirements in requirements.txt
id: cache-python
uses: actions/cache@v3
with:
# pip cache files are stored in `~/.cache/pip`
path: ${{ env.pythonLocation}}/lib/python3.10/site-packages/*
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- if: ${{ steps.cache-python.outputs.cache-hit != 'true' }}
name: Install Dependencies
# continue-on-error: true
run: pip install -r requirements.txt
- name: ls show env.pythonLocation
run: ls -R ${{ env.pythonLocation}}
- name: show module
run: pip show pandas
- name: setup environment and run script
env:
API_KEY_GITHUB_PROJECTBOARD_DASHBOARD: ${{ secrets.API_KEY_GITHUB_PROJECTBOARD_DASHBOARD }}
BASE64_PROJECT_BOARD_GOOGLECREDENTIAL: ${{ secrets.BASE64_PROJECT_BOARD_GOOGLECREDENTIAL }}
API_TOKEN_USERNAME: ${{ secrets.API_TOKEN_USERNAME }}
run: python Project_Board_Dashboard_Script.py