Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding CI to Docs #494

Merged
merged 6 commits into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 83 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
on:
pull_request:
paths:
- docs/**

name: Docs
jobs:
knip:
name: Knip
runs-on: ubuntu-latest
defaults:
run:
working-directory: docs
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Node
uses: actions/setup-node@v4

- run: npm ci
- run: npm run knip:production

prettier:
name: Prettier
runs-on: ubuntu-latest
defaults:
run:
working-directory: docs
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Node
uses: actions/setup-node@v4

- name: Get npm cache directory
id: npm-cache-dir
shell: bash
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}

- name: Cache node modules
id: cache-npm
uses: actions/cache@v3
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-docs-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-docs-

- run: npm ci
- run: npm run prettier:check

typecheck:
name: TS TypeCheck
runs-on: ubuntu-latest
defaults:
run:
working-directory: docs
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Node
uses: actions/setup-node@v4

- name: Get npm cache directory
id: npm-cache-dir
shell: bash
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}

- name: Cache node modules
id: cache-npm
uses: actions/cache@v3
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-docs-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-docs-

- run: npm ci
- name: Build
run: npm run typecheck
8 changes: 8 additions & 0 deletions docs/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.prettierrc.json
.vercel
.vscode
neosync-api-client
README.md
tsconfig.json
charts
dev
6 changes: 6 additions & 0 deletions docs/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"trailingComma": "es5",
"tabWidth": 2,
"semi": true,
"singleQuote": true
}
10 changes: 5 additions & 5 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@ This website is built using [Docusaurus 2](https://docusaurus.io/), a modern sta
### Installation

```
$ yarn
$ npm install
```

### Local Development

```
$ yarn start
$ npm run start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

### Build

```
$ yarn build
$ npm run build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.
Expand All @@ -29,13 +29,13 @@ This command generates static content into the `build` directory and can be serv
Using SSH:

```
$ USE_SSH=true yarn deploy
$ USE_SSH=true npm run deploy
```

Not using SSH:

```
$ GIT_USER=<Your GitHub username> yarn deploy
$ GIT_USER=<Your GitHub username> npm run deploy
```

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
2 changes: 1 addition & 1 deletion docs/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
presets: [require.resolve("@docusaurus/core/lib/babel/preset")],
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};
2 changes: 1 addition & 1 deletion docs/docs/connections/mysql.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ hide_title: true
slug: /connections/mysql
---

import { DocPageHeader } from "@site/src/components/HomepageFeatures/DocPageHeader.tsx";
import { DocPageHeader } from '@site/src/components/HomepageFeatures/DocPageHeader.tsx';

<DocPageHeader
title="Mysql"
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/connections/postgres.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ hide_title: true
slug: /connections/postgres
---

import { DocPageHeader } from "@site/src/components/HomepageFeatures/DocPageHeader.tsx";
import { DocPageHeader } from '@site/src/components/HomepageFeatures/DocPageHeader.tsx';

<DocPageHeader
title="Postgres"
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/connections/s3.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ hide_title: true
slug: /connections/s3
---

import { DocPageHeader } from "@site/src/components/HomepageFeatures/DocPageHeader.tsx";
import { DocPageHeader } from '@site/src/components/HomepageFeatures/DocPageHeader.tsx';

<DocPageHeader
title="S3"
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/deploy/docker-compose.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ hide_title: true
slug: /deploy/docker-compose
---

import { DocPageHeader } from "@site/src/components/HomepageFeatures/DocPageHeader.tsx";
import { DocPageHeader } from '@site/src/components/HomepageFeatures/DocPageHeader.tsx';

<DocPageHeader
title="Deploy with Docker Compose"
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/deploy/introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ hide_title: true
slug: /deploy/intro
---

import { DocPageHeader } from "@site/src/components/HomepageFeatures/DocPageHeader.tsx";
import { DocPageHeader } from '@site/src/components/HomepageFeatures/DocPageHeader.tsx';

<DocPageHeader
title="Deploy Neosync"
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/deploy/kubernetes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ hide_title: true
slug: /deploy/kubernetes
---

import { DocPageHeader } from "@site/src/components/HomepageFeatures/DocPageHeader.tsx";
import { DocPageHeader } from '@site/src/components/HomepageFeatures/DocPageHeader.tsx';

<DocPageHeader
title="Deploy on Kubernetes"
Expand Down
68 changes: 34 additions & 34 deletions docs/docs/overview/Introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,26 @@ hide_title: true
slug: /
---

import { DocPageHeader } from "@site/src/components/HomepageFeatures/DocPageHeader.tsx";
import { HeroImage } from "@site/src/components/HomepageFeatures/HeroImage.tsx";
import { CustomCardList } from "@site/src/components/HomepageFeatures/CustomCardList.tsx";
import { CustomCard } from "@site/src/components/HomepageFeatures/CustomCard.tsx";
import { DocPageHeader } from '@site/src/components/HomepageFeatures/DocPageHeader.tsx';
import { HeroImage } from '@site/src/components/HomepageFeatures/HeroImage.tsx';
import { CustomCardList } from '@site/src/components/HomepageFeatures/CustomCardList.tsx';
import { CustomCard } from '@site/src/components/HomepageFeatures/CustomCard.tsx';
import {
PiArrowsSplitLight,
PiFlaskLight,
PiPlugsLight,
PiRocketLaunchLight,
} from "react-icons/pi";
import { BsFunnel } from "react-icons/bs";
import { FaSync } from "react-icons/fa";
import { GrConnect } from "react-icons/gr";
} from 'react-icons/pi';
import { BsFunnel } from 'react-icons/bs';
import { FaSync } from 'react-icons/fa';
import { GrConnect } from 'react-icons/gr';
import {
LightningBoltIcon,
LayersIcon,
LinkBreak1Icon,
StackIcon,
} from "@radix-ui/react-icons";
import { LuNetwork } from "react-icons/lu";
} from '@radix-ui/react-icons';
import { LuNetwork } from 'react-icons/lu';

<DocPageHeader title="Welcome to the Neosync Docs" />

Expand All @@ -39,31 +39,31 @@ The best way to learn Neosync is to check out our core concepts and familiarize
<CustomCardList
cards={[
{
title: "Jobs",
title: 'Jobs',
description:
"Jobs are async workflows that tranform data and sync it between connections.",
link: "platform#jobs",
'Jobs are async workflows that tranform data and sync it between connections.',
link: 'platform#jobs',
icon: <StackIcon />,
},
{
title: "Runs",
title: 'Runs',
description:
"Runs are instances of a job that can be started, paused and played back.",
link: "platform#runs",
'Runs are instances of a job that can be started, paused and played back.',
link: 'platform#runs',
icon: <LayersIcon />,
},
{
title: "Connections",
title: 'Connections',
description:
"Connections are sources of data or destinations that you sync using Jobs such as databases.",
link: "platform#connections",
'Connections are sources of data or destinations that you sync using Jobs such as databases.',
link: 'platform#connections',
icon: <PiPlugsLight />,
},
{
title: "Transformers",
title: 'Transformers',
description:
"Transformers are data-type specific modules that anonymize or generate data.",
link: "platform#transformers",
'Transformers are data-type specific modules that anonymize or generate data.',
link: 'platform#transformers',
icon: <LightningBoltIcon />,
},
]}
Expand All @@ -87,28 +87,28 @@ Neosync can be used in many different ways to support different use-cases. Check
<CustomCardList
cards={[
{
title: "Anonymize Data",
description: "Anonymize sensitive data for safe testing and development",
link: "overview/use-cases/anonymization",
title: 'Anonymize Data',
description: 'Anonymize sensitive data for safe testing and development',
link: 'overview/use-cases/anonymization',
icon: <LinkBreak1Icon />,
},
{
title: "Synthetic Data",
title: 'Synthetic Data',
description:
"Generate high-quality synthetic data from existing data or from scratch.",
link: "overview/use-cases/synthetic-data",
'Generate high-quality synthetic data from existing data or from scratch.',
link: 'overview/use-cases/synthetic-data',
icon: <PiFlaskLight />,
},
{
title: "Subset Data",
description: "Subset your data to fit local and stage environments.",
link: "overview/use-cases/subsetting",
title: 'Subset Data',
description: 'Subset your data to fit local and stage environments.',
link: 'overview/use-cases/subsetting',
icon: <BsFunnel />,
},
{
title: "Replicate data",
description: "Easily replicate source data to multiple environments.",
link: "overview/use-cases/replication",
title: 'Replicate data',
description: 'Easily replicate source data to multiple environments.',
link: 'overview/use-cases/replication',
icon: <PiArrowsSplitLight />,
},
]}
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/overview/platform.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ hide_title: true
slug: /platform
---

import { DocPageHeader } from "@site/src/components/HomepageFeatures/DocPageHeader.tsx";
import { HeroImage } from "@site/src/components/HomepageFeatures/HeroImage.tsx";
import { DocPageHeader } from '@site/src/components/HomepageFeatures/DocPageHeader.tsx';
import { HeroImage } from '@site/src/components/HomepageFeatures/HeroImage.tsx';

<DocPageHeader title="Platform Overview" />

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/overview/use-cases/anonymization.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ hide_title: true
slug: anonymization
---

import { DocPageHeader } from "@site/src/components/HomepageFeatures/DocPageHeader.tsx";
import { DocPageHeader } from '@site/src/components/HomepageFeatures/DocPageHeader.tsx';

<DocPageHeader title="Anonymization" />

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/overview/use-cases/replication.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ hide_title: true
slug: replication
---

import { DocPageHeader } from "@site/src/components/HomepageFeatures/DocPageHeader.tsx";
import { DocPageHeader } from '@site/src/components/HomepageFeatures/DocPageHeader.tsx';

<DocPageHeader title="Replicate Data" />

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/overview/use-cases/subsetting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ hide_title: true
slug: subsetting
---

import { DocPageHeader } from "@site/src/components/HomepageFeatures/DocPageHeader.tsx";
import { DocPageHeader } from '@site/src/components/HomepageFeatures/DocPageHeader.tsx';

<DocPageHeader title="Subset Data" />

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/overview/use-cases/synthetic-data.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ hide_title: true
slug: synthetic-data
---

import { DocPageHeader } from "@site/src/components/HomepageFeatures/DocPageHeader.tsx";
import { DocPageHeader } from '@site/src/components/HomepageFeatures/DocPageHeader.tsx';

<DocPageHeader title="Synthetic Data" />

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/transformers/custom.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ hide_title: true
slug: /transformers/custom
---

import { DocPageHeader } from "@site/src/components/HomepageFeatures/DocPageHeader.tsx";
import { DocPageHeader } from '@site/src/components/HomepageFeatures/DocPageHeader.tsx';

<DocPageHeader title="Custom" />

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/transformers/introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ hide_title: true
slug: /transformers/introduction
---

import { DocPageHeader } from "@site/src/components/HomepageFeatures/DocPageHeader.tsx";
import { DocPageHeader } from '@site/src/components/HomepageFeatures/DocPageHeader.tsx';

<DocPageHeader title="Transformers" />

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/transformers/pre-built/email.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ hide_title: true
slug: /transformers/pre-built/email
---

import { DocPageHeader } from "@site/src/components/HomepageFeatures/DocPageHeader.tsx";
import { DocPageHeader } from '@site/src/components/HomepageFeatures/DocPageHeader.tsx';

<DocPageHeader title="Email" />

Expand Down
Loading