-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set up SDK Reference generation (#269)
This PR configures mkdocs to generate an SDK reference for the Python SDK.
- Loading branch information
1 parent
6a3f945
commit 7e2c30b
Showing
23 changed files
with
212 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: sdk-reference | ||
|
||
on: | ||
push: | ||
branches: | ||
- v6.0.0-beta | ||
pull_request: | ||
|
||
jobs: | ||
docs: | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: sdk-reference | ||
url: ${{ steps.deploy.outputs.url }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup Nodejs | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
- name: Install dependencies and build | ||
run: pip install .[docs] | ||
- name: Build docs | ||
run: python setup.py build-docs | ||
- name: Set env BRANCH | ||
run: echo "BRANCH=$(echo $GITHUB_REF | cut -d'/' -f 3)" >> $GITHUB_ENV | ||
- name: Set env CLOUDFLARE_BRANCH | ||
run: | | ||
if [[ $BRANCH == 'v6.0.0-beta' && $GITHUB_EVENT_NAME == 'push' ]]; then | ||
echo "CLOUDFLARE_BRANCH=main" >> "$GITHUB_ENV" | ||
else | ||
echo "CLOUDFLARE_BRANCH=$BRANCH" >> "$GITHUB_ENV" | ||
fi | ||
- name: Publish to Cloudflare Pages | ||
uses: cloudflare/pages-action@v1 | ||
id: deploy | ||
with: | ||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | ||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | ||
projectName: nylas-python-sdk-reference | ||
directory: site | ||
wranglerVersion: "3" | ||
branch: ${{ env.CLOUDFLARE_BRANCH }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,5 +63,9 @@ local/ | |
pip-selfcheck.json | ||
tests/output | ||
local.env | ||
examples/test.py | ||
nylas/test.py | ||
.env | ||
|
||
# Documentation | ||
site | ||
docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
site_name: Nylas Python SDK Reference | ||
theme: | ||
name: 'material' | ||
|
||
nav: | ||
- Getting Started: index.md | ||
- Code Reference: reference/ | ||
- Contributing: contributing.md | ||
- License: license.md | ||
|
||
# Add plugins | ||
plugins: | ||
- search | ||
- mkdocstrings: | ||
default_handler: python | ||
handlers: | ||
python: | ||
paths: [ nylas ] | ||
- gen-files: | ||
scripts: | ||
- scripts/generate-docs.py | ||
- literate-nav: | ||
nav_file: SUMMARY.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.