Skip to content

Commit 6103e7d

Browse files
docs: add website (#582)
* docs: add website * fix: docs only mode * fix: fix * fix: fix * fix: fix
1 parent 1855378 commit 6103e7d

37 files changed

+9909
-393
lines changed

.github/workflows/android.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,18 @@ on:
1313
paths:
1414
- '.github/workflows/android.yml'
1515
- 'android/**'
16+
- 'common/**'
1617
- 'example/android/**'
1718

1819
jobs:
1920
android-build:
2021
runs-on: ubuntu-latest
2122
steps:
22-
- uses: actions/checkout@v3
23-
- name: Use Node.js 18.x
24-
uses: actions/setup-node@v3
23+
- uses: actions/checkout@v4
24+
- name: Use Node.js 20.x
25+
uses: actions/setup-node@v4
2526
with:
26-
node-version: 18.x
27+
node-version: 20.x
2728
- uses: actions/setup-java@v2
2829
with:
2930
distribution: 'temurin'
@@ -47,11 +48,11 @@ jobs:
4748
android-build-fabric:
4849
runs-on: ubuntu-latest
4950
steps:
50-
- uses: actions/checkout@v3
51-
- name: Use Node.js 18.x
51+
- uses: actions/checkout@v4
52+
- name: Use Node.js 20.x
5253
uses: actions/setup-node@v1
5354
with:
54-
node-version: 18.x
55+
node-version: 20.x
5556
- uses: actions/setup-java@v2
5657
with:
5758
distribution: 'temurin'

.github/workflows/docs-check.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Docs build check
2+
env:
3+
YARN_ENABLE_HARDENED_MODE: 0
4+
on:
5+
push:
6+
branches:
7+
- main
8+
paths:
9+
- '.github/workflows/docs-check.yml'
10+
- docs/**
11+
pull_request:
12+
paths:
13+
- '.github/workflows/docs-check.yml'
14+
- docs/**
15+
jobs:
16+
build:
17+
if: github.repository == 'AppAndFlow/react-native-safe-area-context'
18+
runs-on: ubuntu-latest
19+
env:
20+
WORKING_DIRECTORY: docs
21+
steps:
22+
- uses: actions/checkout@v4
23+
- name: Use Node.js 20.x
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: 20.x
27+
- name: Install docs deps
28+
working-directory: ${{ env.WORKING_DIRECTORY }}
29+
run: yarn install
30+
- name: Build docs
31+
working-directory: ${{ env.WORKING_DIRECTORY }}
32+
run: yarn build

.github/workflows/docs-deploy.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Docs publish
2+
on:
3+
push:
4+
branches:
5+
- main
6+
paths:
7+
- docs/**
8+
9+
jobs:
10+
publish:
11+
if: github.repository == 'AppAndFlow/react-native-safe-area-context'
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Check out
15+
uses: actions/checkout@v4
16+
17+
- name: Generate awesome content
18+
run: >-
19+
git config --local user.email "action@github.com"
20+
&& git config --local user.name "GitHub Action"
21+
&& cd docs
22+
&& yarn
23+
&& yarn build
24+
25+
- name: Publish generated content to GitHub Pages
26+
uses: JamesIves/github-pages-deploy-action@releases/v3
27+
with:
28+
FOLDER: docs/build
29+
BRANCH: gh-pages
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/ios.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ jobs:
1919
ios-build:
2020
runs-on: macos-latest
2121
steps:
22-
- uses: actions/checkout@v3
23-
- name: Use Node.js 18.x
24-
uses: actions/setup-node@v3
22+
- uses: actions/checkout@v4
23+
- name: Use Node.js 20.x
24+
uses: actions/setup-node@v4
2525
with:
26-
node-version: 18.x
26+
node-version: 20.x
2727
- uses: ruby/setup-ruby@v1
2828
with:
2929
ruby-version: 2.7
@@ -43,11 +43,11 @@ jobs:
4343
ios-build-fabric:
4444
runs-on: macos-latest
4545
steps:
46-
- uses: actions/checkout@v3
47-
- name: Use Node.js 18.x
46+
- uses: actions/checkout@v4
47+
- name: Use Node.js 20.x
4848
uses: actions/setup-node@v1
4949
with:
50-
node-version: 18.x
50+
node-version: 20.x
5151
- uses: ruby/setup-ruby@v1
5252
with:
5353
ruby-version: 2.7

.github/workflows/js.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ jobs:
66
js-tests:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v3
10-
- name: Use Node.js 18.x
11-
uses: actions/setup-node@v3
9+
- uses: actions/checkout@v4
10+
- name: Use Node.js 20.x
11+
uses: actions/setup-node@v4
1212
with:
13-
node-version: 18.x
13+
node-version: 20.x
1414
- name: Restore yarn workspaces
1515
id: yarn-cache
1616
uses: actions/cache@v3

CONTRIBUTING.md

Lines changed: 1 addition & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,3 @@
11
# Contributing
22

3-
## Development workflow
4-
5-
### Install dependencies
6-
7-
Use yarn to install development dependencies.
8-
9-
```sh
10-
yarn install
11-
```
12-
13-
If you don't have bundler installed:
14-
15-
```
16-
gem install bundler
17-
```
18-
19-
Move to the `example` directory and install dependencies there too.
20-
21-
```sh
22-
cd example
23-
yarn install
24-
bundle install
25-
```
26-
27-
```sh
28-
cd ios && bundle exec pod install
29-
```
30-
31-
### Example app
32-
33-
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.
34-
35-
From the `example` directory:
36-
37-
#### iOS
38-
39-
```sh
40-
yarn ios
41-
```
42-
43-
I also recommend opening `example/ios/SafeAreaViewExample.xcworkspace` in Xcode if you need to make changes to native code.
44-
45-
#### Android
46-
47-
```sh
48-
yarn android
49-
```
50-
51-
I also recommend opening `example/android` in Android Studio if you need to make changes to native code.
52-
53-
Use `ctrl+cmd+z` on iOS or `ctrl+m` on Android to open the dev menu and choose an example.
54-
55-
### Run tests
56-
57-
```sh
58-
yarn test
59-
```
60-
61-
### Open a pull request!
3+
See https://appandflow.github.io/react-native-safe-area-context/contributing/

0 commit comments

Comments
 (0)