Skip to content

Commit

Permalink
docs: add website
Browse files Browse the repository at this point in the history
  • Loading branch information
janicduplessis committed Feb 10, 2025
1 parent 1855378 commit 087fc43
Show file tree
Hide file tree
Showing 39 changed files with 9,971 additions and 369 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,18 @@ on:
paths:
- '.github/workflows/android.yml'
- 'android/**'
- 'common/**'
- 'example/android/**'

jobs:
android-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js 18.x
uses: actions/setup-node@v3
- uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 20.x
- uses: actions/setup-java@v2
with:
distribution: 'temurin'
Expand All @@ -47,11 +48,11 @@ jobs:
android-build-fabric:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js 18.x
- uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v1
with:
node-version: 18.x
node-version: 20.x
- uses: actions/setup-java@v2
with:
distribution: 'temurin'
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/docs-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Docs build check
env:
YARN_ENABLE_HARDENED_MODE: 0
on:
push:
branches:
- main
paths:
- '.github/workflows/docs-check.yml'
- docs/**
pull_request:
paths:
- '.github/workflows/docs-check.yml'
- docs/**
jobs:
build:
if: github.repository == 'AppAndFlow/react-native-safe-area-context'
runs-on: ubuntu-latest
env:
WORKING_DIRECTORY: docs
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Install docs deps
working-directory: ${{ env.WORKING_DIRECTORY }}
run: yarn install
- name: Build docs
working-directory: ${{ env.WORKING_DIRECTORY }}
run: yarn build
31 changes: 31 additions & 0 deletions .github/workflows/docs-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Docs publish
on:
push:
branches:
- main
- docs
paths:
- docs/**

jobs:
publish:
if: github.repository == 'AppAndFlow/react-native-safe-area-context'
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v4

- name: Generate awesome content
run: >-
git config --local user.email "action@github.com"
&& git config --local user.name "GitHub Action"
&& cd docs
&& yarn
&& yarn build
- name: Publish generated content to GitHub Pages
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
FOLDER: docs/build
BRANCH: gh-pages
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14 changes: 7 additions & 7 deletions .github/workflows/ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ jobs:
ios-build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js 18.x
uses: actions/setup-node@v3
- uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 20.x
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
Expand All @@ -43,11 +43,11 @@ jobs:
ios-build-fabric:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js 18.x
- uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v1
with:
node-version: 18.x
node-version: 20.x
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ jobs:
js-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js 18.x
uses: actions/setup-node@v3
- uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 20.x
- name: Restore yarn workspaces
id: yarn-cache
uses: actions/cache@v3
Expand Down
60 changes: 1 addition & 59 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,61 +1,3 @@
# Contributing

## Development workflow

### Install dependencies

Use yarn to install development dependencies.

```sh
yarn install
```

If you don't have bundler installed:

```
gem install bundler
```

Move to the `example` directory and install dependencies there too.

```sh
cd example
yarn install
bundle install
```

```sh
cd ios && bundle exec pod install
```

### Example app

Start the example app to test your changes. You can use one of the following commands from the repo root, depending on the platform you want to use.

From the `example` directory:

#### iOS

```sh
yarn ios
```

I also recommend opening `example/ios/SafeAreaViewExample.xcworkspace` in Xcode if you need to make changes to native code.

#### Android

```sh
yarn android
```

I also recommend opening `example/android` in Android Studio if you need to make changes to native code.

Use `ctrl+cmd+z` on iOS or `ctrl+m` on Android to open the dev menu and choose an example.

### Run tests

```sh
yarn test
```

### Open a pull request!
See https://docs.appandflow.com/react-native-safe-area-context/docs/contributing
Loading

0 comments on commit 087fc43

Please sign in to comment.