Skip to content

Commit

Permalink
adds automatic generated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Rishabh committed Oct 18, 2021
1 parent 127901c commit 3fc1467
Show file tree
Hide file tree
Showing 86 changed files with 3,110 additions and 289 deletions.
15 changes: 15 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,14 @@ jobs:
docker rm demo-app-thirdpartyemailpassword -f || true && \
bash /home/ubuntu/supertokens-auth-react/examples/with-thirdpartyemailpassword/scripts/start_container.sh'
- slack/status
update-docs:
docker:
- image: rishabhpoddar/supertokens_website_sdk_testing
steps:
- checkout
- run: cd ../ && git clone [email protected]:supertokens/supertokens-backend-website.git
- run: (cd .circleci && ./updateDocsInWebsite.sh)
- slack/status

workflows:
version: 2
Expand Down Expand Up @@ -102,3 +110,10 @@ workflows:
branches:
only:
- master
- update-docs:
context:
- slack-notification
filters:
branches:
only:
- master
28 changes: 28 additions & 0 deletions .circleci/updateDocsInWebsite.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# get driver version
version=`cat ../package.json | grep -e '"version":'`
while IFS='"' read -ra ADDR; do
counter=0
for i in "${ADDR[@]}"; do
if [ $counter == 3 ]
then
version=$i
fi
counter=$(($counter+1))
done
done <<< "$version"

# replace path version with X
IFS='.' read -r -a array <<< "$version"
versionFolder="${array[0]}"."${array[1]}".X

# create auth-react docs dir in repo if not exists
(cd ../../supertokens-backend-website && mkdir -p ./app/docs/sdk/docs/auth-react/${versionFolder})

# copy docs content from this repo to the supertokens-backend-website repo
cp -r ../docs/* ../../supertokens-backend-website/app/docs/sdk/docs/auth-react/
cp -r ../docs/* ../../supertokens-backend-website/app/docs/sdk/docs/auth-react/${versionFolder}

# push to git
git config --global user.email "$EMAIL"
git config --global user.name "$NAME"
(cd ../../supertokens-backend-website && git add --all && git commit -m"updates auth-react docs" && git pull && git push && ./releaseDev.sh)
4 changes: 2 additions & 2 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ frontendDriverInterfaceSupported.json
examples/
.prettierignore
other/

jest.config.js
jest.config.js
docs/
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docs/
1 change: 1 addition & 0 deletions addDevTag
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ fi
if [ $# -eq 0 ]
then
npm run build-pretty
npm run build-docs
git add --all
git commit --allow-empty -m"adding dev-v$version tag to this commit to ensure building"
git push
Expand Down
1 change: 1 addition & 0 deletions docs/.nojekyll
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false.
22 changes: 22 additions & 0 deletions docs/assets/highlight.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
:root {
--light-code-background: #FFFFFF;
--dark-code-background: #1E1E1E;
}

@media (prefers-color-scheme: light) { :root {
--code-background: var(--light-code-background);
} }

@media (prefers-color-scheme: dark) { :root {
--code-background: var(--dark-code-background);
} }

body.light {
--code-background: var(--light-code-background);
}

body.dark {
--code-background: var(--dark-code-background);
}

pre, code { background: var(--code-background); }
Loading

0 comments on commit 3fc1467

Please sign in to comment.