https://github.com/frain-dev/mintlify-preview-action
Github action for Mintlify previewer.
https://github.com/frain-dev/mintlify-preview-action
Last synced: 3 months ago
JSON representation
Github action for Mintlify previewer.
- Host: GitHub
- URL: https://github.com/frain-dev/mintlify-preview-action
- Owner: frain-dev
- Created: 2025-02-18T13:23:23.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-03T22:42:59.000Z (about 1 year ago)
- Last Synced: 2025-07-11T15:02:35.156Z (9 months ago)
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Mintlify Preview GitHub Action ๐
This GitHub Action automates the process of deploying a **Mintlify preview** for documentation updates when a pull
request is opened or updated. It posts a comment on the pull request with a link to the preview deployment.
## Usage
To use this action, add the following workflow to your repository (`.github/workflows/mintlify-preview.yml`):
```yaml
name: Mintlify Preview
on:
pull_request:
paths:
- 'docs/**' # Trigger only for changes in the docs directory
types:
- opened
- synchronize
jobs:
preview:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Deploy Mintlify Preview
uses: frain-dev/mintlify-preview-action@v0.1.3
with:
docs_path: "docs/mint.json" # Path to your documentation file
github_token: ${{ secrets.GITHUB_TOKEN }}
```
## Inputs
The action accepts the following inputs:
| Input Name | Description | Required | Default Value |
|----------------|---------------------------------------------------------|----------|--------------------------------------------------|
| `docs_path` | Path to the documentation file (e.g., `docs/mint.json`) | Yes | None |
| `backend_url` | Custom backend server for deployment (optional) | No | `https://mintlify-previewer.getconvoy.io/deploy` |
| `github_token` | GitHub token to comment on the PR | Yes | None |
## Outputs
The action provides the following output:
| Output Name | Description |
|------------------|---------------------------------|
| `deployment_url` | The URL of the Mintlify preview |
## Branding
- **Icon**: `upload-cloud`
- **Color**: `blue`
## How It Works
1. The action triggers on pull requests that modify files in the `docs/` directory.
2. It sends a request to the Mintlify previewer backend with the pull request details and documentation path.
3. The backend generates a preview deployment and returns the deployment URL.
4. The action posts a comment on the pull request with the preview URL.
## Example
Hereโs an example of the comment posted on the pull request:
```
๐ Mintlify preview available at: https://01jnewdvfews9e74yvxftbp67c.mintlify-previewer.getconvoy.io
Powered by Convoy - send webhooks in minutes not months!
```
## License
This project is licensed under the [MIT License](LICENSE).
---
Made with โค๏ธ by [frain-dev](https://github.com/frain-dev)