From 8598df99e333a10193ee5fce45869a44299acec0 Mon Sep 17 00:00:00 2001 From: chdeskur Date: Thu, 10 Oct 2024 10:45:33 -0400 Subject: [PATCH] init style --- .github/workflows/preview-docs.yml | 30 +++++++++ .github/workflows/publish-docs.yml | 22 +++++++ README.md | 24 ++++++++ fern/docs.yml | 43 ++++++++----- fern/welcome.mdx | 98 ++++++++++++++++++++++++++++++ 5 files changed, 201 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/preview-docs.yml create mode 100644 .github/workflows/publish-docs.yml create mode 100644 fern/welcome.mdx diff --git a/.github/workflows/preview-docs.yml b/.github/workflows/preview-docs.yml new file mode 100644 index 0000000..4b9c83b --- /dev/null +++ b/.github/workflows/preview-docs.yml @@ -0,0 +1,30 @@ +name: Preview Docs + +on: pull_request + +jobs: + run: + runs-on: ubuntu-latest + permissions: write-all + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install Fern + run: npm install -g fern-api + + - name: Generate preview URL + id: generate-docs + env: + FERN_TOKEN: ${{ secrets.FERN_TOKEN }} + run: | + OUTPUT=$(fern generate --docs --preview --log-level debug 2>&1) || true + 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/actions-comment-pull-request@v2.4.3 + with: + filePath: preview_url.txt \ No newline at end of file diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml new file mode 100644 index 0000000..3401b4d --- /dev/null +++ b/.github/workflows/publish-docs.yml @@ -0,0 +1,22 @@ +name: Publish Docs + +on: + push: + branches: + - main + +jobs: + run: + runs-on: ubuntu-latest + if: ${{ github.event_name == 'push' && contains(github.ref, 'refs/heads/main') && github.run_number > 1 }} + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install Fern + run: npm install -g fern-api + + - name: Publish Docs + env: + FERN_TOKEN: ${{ secrets.FERN_TOKEN }} + run: fern generate --docs \ No newline at end of file diff --git a/README.md b/README.md index 65d5416..6b038fd 100644 --- a/README.md +++ b/README.md @@ -44,3 +44,27 @@ This will generate the SDK and download it to a local folder that can be pip ins ```sh pip install -e /fern/.preview/fern-python-sdk ``` + +## How to update documentation? + +### Local Development server + +To run a local development server with hot-reloading you can run the following command + +```sh +fern docs dev +``` + +#### Hosted URL + +To update your documentation on a hosted URL, run +``` +# npm install -g fern-api +fern generate --docs +``` +To preview your documentation, run +``` +# npm install -g fern-api +fern generate --docs --preview +``` +The repository contains GitHub workflows that will automatically run these commands for you. For example, when you make a PR a preview link will be auto-generated and when you merge to main the docs site will update. \ No newline at end of file diff --git a/fern/docs.yml b/fern/docs.yml index e275b07..64bab7e 100644 --- a/fern/docs.yml +++ b/fern/docs.yml @@ -15,9 +15,15 @@ colors: background: dark: '#000000' light: '#FFFFFF' + header-background: + dark: '#000000' + light: '#FFFFFF' experimental: mdx-components: - snippets +landing-page: + page: Welcome + path: welcome.mdx css: assets/styles.css navbar-links: - type: minimal @@ -40,6 +46,12 @@ navbar-links: rightIcon: fa-solid fa-chevron-right href: https://example.com/login rounded: true +footer-links: + github: https://github.com/vapiai + twitter: https://twitter.com/vapi_ai + discord: https://discord.gg/pUFNcf2WmH + website: https://vapi.ai/ + linkedin: https://www.linkedin.com/company/vapi-ai tabs: api-reference: slug: api-reference @@ -50,13 +62,12 @@ tabs: layout: tabs-placement: header searchbar-placement: header + header-height: 80px navigation: - tab: documentation layout: - - section: '' - contents: - - page: Introduction - path: introduction.mdx + - page: Introduction + path: introduction.mdx - section: General contents: - section: How Vapi Works @@ -89,8 +100,8 @@ navigation: path: changelog.mdx - page: Support path: support.mdx - - page: Status - path: status.mdx + - link: Status + href: https://status.vapi.ai/ - section: Quickstart contents: - page: Dashboard @@ -305,12 +316,12 @@ navigation: contents: - page: HIPAA Compliance path: security-and-privacy/hipaa.mdx - - page: SOC-2 Compliance - path: security-and-privacy/soc.mdx - - page: Privacy Policy - path: security-and-privacy/privacy-policy.mdx - - page: Terms of Service - path: security-and-privacy/tos.mdx + - link: SOC-2 Compliance + href: https://security.vapi.ai/ + - link: Privacy Policy + href: https://vapi.ai/privacy + - link: Terms of Service + href: https://vapi.ai/terms-of-service - tab: api-reference layout: - api: API Reference @@ -325,8 +336,8 @@ navigation: paginated: true - section: '' contents: - - page: Swagger - path: api-reference/swagger.mdx - - page: OpenAPI - path: api-reference/openapi.mdx + - link: Swagger + href: https://api.vapi.ai/api + - link: OpenAPI + href: https://api.vapi.ai/api-json \ No newline at end of file diff --git a/fern/welcome.mdx b/fern/welcome.mdx new file mode 100644 index 0000000..123aac6 --- /dev/null +++ b/fern/welcome.mdx @@ -0,0 +1,98 @@ +--- +layout: custom +--- + + + +
+

Welcome to Vapi's

+

Developer Documentation

+

Build, test, & deploy voice AI agents in minutes rather than months

+ +
+ +
+ + Months to work to production, continued DevOps and R&D investment. + +
+
+ +} +> +In production tonight, world-class pushing DevOps and R&D. + + +
+
+
+
\ No newline at end of file