-
Notifications
You must be signed in to change notification settings - Fork 9
68 lines (54 loc) · 1.59 KB
/
ai-content-prep.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Prepare website content for AI
# on:
# push:
# branches:
# - main
on:
workflow_dispatch:
jobs:
sync-website:
defaults:
run:
working-directory: ./devcon
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "18"
- name: Install dependencies
run: yarn
- name: Create env file
run: |
touch .env
echo OPEN_AI_KEY='${{ secrets.OPEN_AI_KEY }}' >> .env
echo OPEN_AI_ASSISTANT_ID='asst_fUtZhDjL35nZBBog2bJTKNoy' >> .env
echo GITHUB_SHA='${{ github.sha }}' >> .env
- name: Run script
run: yarn ai-content-sync
sync-schedule:
# Running after the website content is synced because that job is also responsible for creating the vector store which this job will use
needs: sync-website
defaults:
run:
working-directory: ./devcon-api
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "20"
- name: Install dependencies
run: yarn --ignore-scripts
- name: Create env file
run: |
touch .env
echo OPEN_AI_KEY='${{ secrets.OPEN_AI_KEY }}' >> .env
echo OPEN_AI_ASSISTANT_ID='asst_B3UJxQ8V53rmVWxaqu3Iraif' >> .env
echo GITHUB_SHA='${{ github.sha }}' >> .env
- name: Run script
run: yarn ai-schedule-sync