Skip to content

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

fix: improve preview URL extraction in workflow

[email protected]fb9d779eae73
diff --git a/.github/workflows/preview_docs.yml b/.github/workflows/preview_docs.yml
index 8703514ba..e1a5ca7e4 100644
--- a/.github/workflows/preview_docs.yml
+++ b/.github/workflows/preview_docs.yml
@@ -44,12 +44,12 @@ jobs:
env:
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }}
- run: pnpm turbo run preview -- --log-level debug
-
- - name: Extract and comment preview URL
- working-directory: ./fern
run: |
- echo "🌿 Check the logs above for the preview URL" > preview_url.txt
+ OUTPUT=$(pnpm turbo run preview -- --log-level debug)
+ echo "$OUTPUT"
+ URL=$(echo "$OUTPUT" | grep -oP 'Published docs to \K.*(?= \()')
+ echo "Preview URL: $URL"
+ echo "🌿 Preview your docs: $URL" > preview_url.txt
- name: Comment URL in PR
uses: thollander/[email protected]