-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (37 loc) · 1.09 KB
/
import3.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
41
42
43
44
45
46
47
48
name: Download CSV from Google Drive
on:
schedule:
- cron: '30 22 * * *'
jobs:
download:
runs-on: ubuntu-latest
steps:
- name: Check out the code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: pip install gdown
- name: Download CSV from Google Drive
run: |
# Specify the Google Drive file ID for your CSV
file_id="1DXYTtzUVVxWSu9wDBjNDZW5YrLKJtiWL"
# Specify the output file name
output_file="new-singles.csv"
# Download the file
gdown "https://drive.google.com/uc?id=$file_id" -O site/$output_file
env:
file_id: ${{ secrets.GOOGLE_DRIVE_FILE_ID }}
- name: Configure Git
run: |
git config user.name "nhlocal"
git config user.email "[email protected]"
- name: Commit changes
run: |
git add -f site/
git commit -m "Add downloaded CSV to the 'site' folder"
- name: Push changes
run: |
git push