-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (37 loc) · 1.1 KB
/
run_parser.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
name: Run parser
on:
schedule:
- cron: '*/10 * * * *' # Every 10 minutes
workflow_dispatch:
permissions:
roles:
# A special role to limit who can deploy stuff - see https://github.com/orgs/StampyAI/teams/deployers
- StampyAI/deployers
inputs:
force-parse:
description: 'Whether to force a reparse of all answers'
type: choice
options:
- false
- true
env:
CODA_TOKEN: ${{ secrets.CODA_TOKEN }}
GCLOUD_CREDENTIALS: ${{ secrets.GCLOUD_CREDENTIALS }}
DISCORD_ERROR: ${{ secrets.DISCORD_ERROR }}
DISCORD_FEED: ${{ secrets.DISCORD_FEED }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
jobs:
run-parser:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20.x'
- name: Install dependencies
run: npm install
- name: Run the parser
run: PARSE_ALL=${{inputs.force-parse}} node bin/importContent.js