Skip to content

Prepare website content for AI #207

Prepare website content for AI

Prepare website content for AI #207

name: Prepare website content for AI
# on:
# push:
# branches:
# - main
on:
workflow_dispatch:
jobs:
sync-website-content:
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 GITHUB_SHA='${{ github.sha }}' >> .env
- name: Run script
run: yarn ai-content-sync
sync-devconnect-content:
defaults:
run:
working-directory: ./devconnect
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 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-content, sync-devconnect-content]
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 GITHUB_SHA='${{ github.sha }}' >> .env
- name: Run script
run: yarn ai-schedule-sync