Skip to content
This repository has been archived by the owner on Apr 7, 2024. It is now read-only.

Add CI docs #71

Merged
merged 13 commits into from
Jan 16, 2024
5 changes: 3 additions & 2 deletions .floe/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
},
"rulesets": {
"docs": {
"include": ["**/*.md", "**/*.mdx"],
"include": ["apps/web/pages/docs/**/*.{md,mdx}"],
"rules": {
"spelling-and-grammar": "warn"
"spelling-and-grammar": "warn",
"docs-style": "warn"
}
}
}
Expand Down
1 change: 1 addition & 0 deletions .floe/rules/docs-style.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Don't use we or I. Use the third person.
1 change: 1 addition & 0 deletions apps/web/pages/docs/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"quick-start": "Quick start",
"usage": "Basic usage",
"configuration": "Configuration",
"ci": "CI",
"-- API reference": {
"type": "separator",
"title": "API reference"
Expand Down
50 changes: 50 additions & 0 deletions apps/web/pages/docs/ci.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import { Callout } from 'nextra/components'

# CI

Using the Floe Reviews GitHub Action is the easiest way to integrate Floe
NicHaley marked this conversation as resolved.
Show resolved Hide resolved
Reviews into your CI pipeline. The action will automatically review your pull
request diffs and leave comments for issues and suggested fixes.

## Usage

Copy the following workflow into your repository's `.github/workflows` directory.
NicHaley marked this conversation as resolved.
Show resolved Hide resolved

<Callout emoji="💡">Be sure to set `FLOE_API_WORKSPACE` and
`FLOE_API_SECRET` on the "Actions secrets and variables" page in your GitHub
NicHaley marked this conversation as resolved.
Show resolved Hide resolved
settings. `GITHUB_TOKEN` is available by default.</Callout>

```yaml copy filename=".github/workflows/floe-review.yml"
name: "Floe Review"
on:
pull_request:

jobs:
Review:
env:
FLOE_API_WORKSPACE: ${{ secrets.FLOE_API_WORKSPACE }}
FLOE_API_SECRET: ${{ secrets.FLOE_API_SECRET }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

# Checkout the Floe repository
- name: Checkout Floe
uses: actions/checkout@v4
with:
repository: Floe-dev/floe
ref: "@floe/[email protected]"
path: ./.github/actions/floe-actions

# Run the review action
- name: Review
uses: ./.github/actions/floe-actions/actions/review-action
```

## Versioning

The Floe Review GitHub Action is verisoned using the `ref` attribute and passing
NicHaley marked this conversation as resolved.
Show resolved Hide resolved
a git tag. You can find the latest `@floe/review-action`
NicHaley marked this conversation as resolved.
Show resolved Hide resolved
[here](https://github.com/Floe-dev/floe/tags).