Skip to content

Commit

Permalink
Merge pull request #5 from VapiAI/fern/add-styles
Browse files Browse the repository at this point in the history
Fern/add styles
  • Loading branch information
fern-support authored Oct 10, 2024
2 parents 8c80643 + cfd0da6 commit ffcd33f
Show file tree
Hide file tree
Showing 5 changed files with 130 additions and 16 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/preview-docs.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
with:
filePath: preview_url.txt
22 changes: 22 additions & 0 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
@@ -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
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
45 changes: 29 additions & 16 deletions fern/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -40,23 +46,30 @@ 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
icon: terminal
display-name: API Reference
documentation:
display-name: Documentation
icon: book
slug: documentation
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
Expand Down Expand Up @@ -89,8 +102,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
Expand Down Expand Up @@ -305,12 +318,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
Expand All @@ -325,8 +338,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

25 changes: 25 additions & 0 deletions fern/welcome.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
title: Welcome to Vapi's Developer Documentation
layout: overview
---

Everything you need to build, test, & deploy voice AI agents in minutes rather than months

<CardGroup cols={2}>
<Card
title="Quickstart"
icon="clock"
href="/quickstart/dashboard"
>
Get started now with the Vapi web dashboard.
</Card>
<Card title="Documentation" icon="book" href="introduction">
Reference our documentation for how to use Vapi's Voice AI platform.
</Card>
<Card title="Community" icon="fa-brands fa-discord" href="https://discord.gg/pUFNcf2WmH">
Connect with our team & other developers using Vapi.
</Card>
<Card title="GitHub" icon="fa-brands fa-github" href="https://github.com/VapiAI">
Check out our GitHub to see what the Vapi team has been up to.
</Card>
</CardGroup>

0 comments on commit ffcd33f

Please sign in to comment.