-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (45 loc) · 1.4 KB
/
upload-debates.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
name: Get Debates
on:
workflow_dispatch:
schedule:
# run once every day at midnight
- cron: '0 0 * * *'
jobs:
process-debates:
defaults:
run:
shell: bash -leo pipefail {0}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.DEPLOY_TOKEN }}
- uses: mamba-org/setup-micromamba@v1
name: install deps
with:
micromamba-version: '1.3.1-0'
environment-file: environment-simple.yml
init-shell: >-
bash
cache-environment: true
post-cleanup: 'all'
- name: Setup Rclone
uses: AnimMouse/setup-rclone@v1
with:
rclone_config: ${{ secrets.RCLONE_CONFIG }}
- name: Extract gcloud config from rclone config
run: echo "${{ secrets.RCLONE_CONFIG }}" | python parse_rclone_conf.py > gcloud.json
- name: Process Debates
env:
CLIENT_SECRETS_FILE: gcloud.json
run: python process_debates.py --skip-transcription
- name: Commit and Push Changes
uses: EndBug/add-and-commit@v7
with:
message: 'Update debates data'
add: 'public/debates/ src/debates.json'
- name: Refresh Rclone Config
uses: AnimMouse/setup-rclone/update-config@v1
with:
rclone_config_secret_name: RCLONE_CONFIG
token: ${{ secrets.DEPLOY_TOKEN }}