Skip to content

Commit

Permalink
docs: added documentation website
Browse files Browse the repository at this point in the history
  • Loading branch information
gorhom committed Sep 22, 2024
1 parent a93aed9 commit cb750f6
Show file tree
Hide file tree
Showing 119 changed files with 13,829 additions and 143 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Deploy to GitHub Pages

on:
push:
branches:
- master

jobs:
build:
name: Build Docusaurus
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 18
cache: yarn

- name: Install dependencies
working-directory: website
run: yarn install --frozen-lockfile
- name: Build website
working-directory: website
run: yarn build

- name: Upload Build Artifact
uses: actions/upload-pages-artifact@v3
with:
path: website/build

deploy:
name: Deploy to GitHub Pages
needs: build

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source

# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
56 changes: 0 additions & 56 deletions .github/workflows/documentation.yml

This file was deleted.

23 changes: 22 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Pods/

# node.js
#
node_modules/
node_modules
npm-debug.log
yarn-debug.log
yarn-error.log
Expand All @@ -56,3 +56,24 @@ android/keystores/debug.keystore

# generated by bob
lib/

# Dependencies
docs/node_modules

# Production
docs//build

# Generated files
docs/.docusaurus
docs/.cache-loader

# Misc
docs/.DS_Store
docs/.env.local
docs/.env.development.local
docs/.env.test.local
docs/.env.production.local

docs/npm-debug.log*
docs/yarn-debug.log*
docs/yarn-error.log*
14 changes: 10 additions & 4 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
"indentStyle": "space",
"lineEnding": "lf",
"lineWidth": 80,
"ignore": ["**/.github", "**/lib", "**/.expo"]
"ignore": ["**/.github", "**/lib", "**/.expo", "**/website"]
},
"organizeImports": { "enabled": true },
"organizeImports": { "enabled": true, "ignore": ["**/website"] },
"linter": {
"enabled": true,
"rules": {
Expand Down Expand Up @@ -73,7 +73,7 @@
"useValidTypeof": "warn"
}
},
"ignore": ["**/node_modules/", "**/lib", "**/.expo"]
"ignore": ["**/node_modules/", "**/lib", "**/.expo", "**/website"]
},
"javascript": {
"jsxRuntime": "reactClassic",
Expand All @@ -100,6 +100,12 @@
]
},
"files": {
"ignore": ["**/node_modules/", "**/lib", "**/.expo", "./example"]
"ignore": [
"**/node_modules/",
"**/lib",
"**/.expo",
"**/example",
"**/website"
]
}
}
13 changes: 11 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@
"types": "lib/typescript/index.d.ts",
"react-native": "src/index.ts",
"source": "src/index.ts",
"files": ["src", "lib", "mock.js"],
"files": [
"src",
"lib",
"mock.js"
],
"keywords": [
"react-native",
"ios",
Expand Down Expand Up @@ -37,6 +41,7 @@
"bootstrap": "yarn install && yarn example"
},
"dependencies": {
"@docusaurus/theme-search-algolia": "^3.5.2",
"@gorhom/portal": "1.0.14",
"invariant": "^2.2.4"
},
Expand Down Expand Up @@ -78,6 +83,10 @@
"react-native-builder-bob": {
"source": "src",
"output": "lib",
"targets": ["commonjs", "module", "typescript"]
"targets": [
"commonjs",
"module",
"typescript"
]
}
}
20 changes: 20 additions & 0 deletions website/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
41 changes: 41 additions & 0 deletions website/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Website

This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.

### Installation

```
$ yarn
```

### Local Development

```
$ yarn 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
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

### Deployment

Using SSH:

```
$ USE_SSH=true yarn deploy
```

Not using SSH:

```
$ GIT_USER=<Your GitHub username> yarn 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.
3 changes: 3 additions & 0 deletions website/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};
Loading

0 comments on commit cb750f6

Please sign in to comment.