feat: pass pathway id to the form query in awell sdk (#529) #379
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: Push docs to MarkPrompt | |
on: | |
push: | |
branches: | |
- main | |
env: | |
MARKPROMPT_TOKEN: ${{ secrets.MARKPROMPT_TOKEN }} | |
jobs: | |
upload-docs: | |
name: Upload Docs to MarkPrompt | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Prepare Renamed Docs | |
run: | | |
find extensions -type f -name "README.md" -print0 | while IFS= read -r -d '' file; do | |
parent=$(basename "$(dirname "$file")") | |
if [ "$parent" != "avaAi" ] && [ "$parent" != "hello-world" ] && [ "$parent" != "wellinks" ]; then | |
cp "$file" "$(dirname "$file")/${parent}_extension.md" | |
fi | |
done | |
- name: Generate Marketplace File | |
run: | | |
echo '---' > extensions/marketplace.md | |
echo 'title: Awell Marketplace' >> extensions/marketplace.md | |
echo 'description: The Awell Marketplace lists all available extensions that help you integrate all the apps you already use for CareOps in your care flows.' >> extensions/marketplace.md | |
echo '---' >> extensions/marketplace.md | |
echo '# Awell Marketplace' >> extensions/marketplace.md | |
echo '' >> extensions/marketplace.md | |
echo 'The Awell Marketplace lists all available extensions that help you integrate all the apps you already use for CareOps in your care flows. Awell has an integration or extension with the following apps:' >> extensions/marketplace.md | |
find extensions -type f -name "*_extension.md" -print0 | while IFS= read -r -d '' file; do | |
title=$(grep -m 1 '^title: ' "$file" | sed -e 's/title: //') | |
description=$(grep -m 1 '^description: ' "$file" | sed -e 's/description: //') | |
echo "- $title: $description" >> extensions/marketplace.md | |
done | |
- name: Zip Docs | |
run: zip data.zip $(find extensions -type f -name "*_extension.md") extensions/marketplace.md | |
- name: Upload docs to MarkPrompt | |
run: | | |
curl https://api.markprompt.com/v1/train \ | |
-X POST \ | |
-H "Authorization: Bearer ${{ env.MARKPROMPT_TOKEN }}" \ | |
-H "Content-Type: application/zip" \ | |
--data-binary @data.zip | |
- name: Clean Up Copied Files | |
run: | | |
find extensions -type f -name "*_extension.md" -exec sh -c 'parent=$(basename $(dirname {})); filename=$(basename {}); if [ "$filename" = "${parent}_extension.md" ]; then rm -f {}; fi' \; | |
rm extensions/marketplace.md |