Add test markdown file for GitHub Action #1
This file contains hidden or 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: Vectorize Updated Docs | |
on: | |
push: | |
branches: | |
- '**' # TODO: set to main when done testing | |
paths: | |
- 'flutterflow-documentation/docs/**/*.md' | |
jobs: | |
vectorize: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
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 langchain google-cloud-bigquery google-generativeai | |
- name: Authenticate GCP | |
env: | |
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }} | |
run: | | |
echo "${GOOGLE_APPLICATION_CREDENTIALS}" > gcp-key.json | |
export GOOGLE_APPLICATION_CREDENTIALS=gcp-key.json | |
- name: Vectorize modified files | |
run: | | |
for file in $(git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep '^flutterflow-documentation/docs/.*\.md$'); do | |
echo "Processing $file..." | |
python .github/scripts/vectorize_action.py "$file" | |
done |