Skip to content

Commit

Permalink
Create datasette.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ibbsbbr authored Jun 22, 2024
1 parent 200f740 commit e199a41
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/datasette.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build README and deploy Datasette

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install datasette openai-to-sqlite
- name: Fetch markdown files and convert to SQLite
run: |
mkdir -p data
for file in $(find . -name "*.md"); do
openai-to-sqlite insert data/documents.db documents "$file"
done
- name: Deploy to Datasette
run: datasette publish vercel data/documents.db --token ${{ secrets.VERCEL_TOKEN }}

0 comments on commit e199a41

Please sign in to comment.