Document the programmatic API access options (#3352) #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Summarize and Upload Docs | |
on: | |
push: | |
branches: [release/**] | |
jobs: | |
summarize-and-upload: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
id-token: write | |
steps: | |
- uses: actions/checkout@v3 | |
- 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 openai pathlib huggingface_hub | |
npm install -g repomix | |
- name: Generate repomix outputs | |
run: | | |
# Create directory for outputs | |
mkdir -p repomix-outputs | |
# Full docs | |
repomix --include "docs/book/**/*.md" | |
mv repomix-output.txt repomix-outputs/llms-full.txt | |
# Component guide | |
repomix --include "docs/book/component-guide/**/*.md" | |
mv repomix-output.txt repomix-outputs/component-guide.txt | |
# User guide | |
repomix --include "docs/book/user-guide/**/*.md" | |
mv repomix-output.txt user-guide.txt | |
# Getting started | |
repomix --include "docs/book/getting-started/**/*.md" | |
mv repomix-output.txt getting-started.txt | |
# Merge user guide and getting started into basics | |
cat user-guide.txt getting-started.txt > repomix-outputs/basics.txt | |
rm user-guide.txt getting-started.txt | |
- name: Upload repomix outputs | |
uses: actions/upload-artifact@v4 | |
with: | |
name: repomix-outputs | |
path: repomix-outputs | |
retention-days: 5 | |
- name: Summarize and upload to HuggingFace | |
env: | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
HF_TOKEN: ${{ secrets.HF_TOKEN }} | |
run: |- | |
python scripts/summarize_docs.py | |
python scripts/upload_to_huggingface.py |