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

Commit

Permalink
Add CI docs (#71)
Browse files Browse the repository at this point in the history
* Add CI docs

* Add versioning section

* Update apps/web/pages/docs/ci.mdx

Co-authored-by: floe-app[bot] <140294159+floe-app[bot]@users.noreply.github.com>

* Add changeset

* Bump review-action version

* Try out new action version

* Omit version patch to see if it works

* Try with star

* Hardcode version

* Add versionless blurb

* Add back GITHUB_TOKEN

* Update apps/web/pages/docs/ci.mdx

Co-authored-by: floe-app[bot] <140294159+floe-app[bot]@users.noreply.github.com>

* Remove the third person rule

---------

Co-authored-by: floe-app[bot] <140294159+floe-app[bot]@users.noreply.github.com>
  • Loading branch information
NicHaley and floe-app[bot] authored Jan 16, 2024
1 parent 4e325dd commit 3c950d3
Show file tree
Hide file tree
Showing 8 changed files with 71 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/dull-bugs-cry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@floe/review-action": minor
---

Modify diff lookup strategy to support forked braches in PRs.
1 change: 1 addition & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"changesets": [
"bright-ducks-help",
"clean-drinks-laugh",
"dull-bugs-cry",
"dull-buttons-draw",
"dull-yaks-worry",
"fast-coins-unite",
Expand Down
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"
6 changes: 6 additions & 0 deletions actions/review-action/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @floe/review-action

## 0.1.0-beta.6

### Minor Changes

- b7e69cc: Modify diff lookup strategy to support forked braches in PRs.

## 0.1.0-beta.5

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion actions/review-action/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@floe/review-action",
"version": "0.1.0-beta.5",
"version": "0.1.0-beta.6",
"private": true,
"scripts": {
"build": "ncc build src/index.ts --out dist --source-map --license licenses.txt",
Expand Down
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
53 changes: 53 additions & 0 deletions apps/web/pages/docs/ci.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import { Callout } from 'nextra/components'

# CI

Using the Floe Reviews GitHub Action is the easiest way to integrate Floe
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 the repository's `.github/workflows` directory.

<Callout emoji="💡">Be sure to set `FLOE_API_WORKSPACE` and
`FLOE_API_SECRET` on the "Actions secrets and variables" page in your GitHub
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 versioned using the `ref` attribute and passing
a git tag. You can find the latest `@floe/review-action`
[here](https://github.com/Floe-dev/floe/tags).

You can keep Floe up to date with the latest versioning by removing the `ref`,
but this is not recommended while Floe is in beta.

2 comments on commit 3c950d3

@vercel
Copy link

@vercel vercel bot commented on 3c950d3 Jan 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

floe-api – ./apps/api

www.api.floe.dev
floe-api-git-main-floe-dev.vercel.app
floe-api.vercel.app
floe-api-floe-dev.vercel.app
api.floe.dev

@vercel
Copy link

@vercel vercel bot commented on 3c950d3 Jan 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

floe-app – ./apps/app

floe-app-git-main-floe-dev.vercel.app
floe-app-floe-dev.vercel.app
floe-app.vercel.app
app.floe.dev
www.app.floe.dev

Please sign in to comment.