-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add script to Generate and Publish APIs into GitHub Pages (#213)
- Loading branch information
Showing
10 changed files
with
187 additions
and
0 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
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,33 @@ | ||
#!/usr/bin/env bash | ||
|
||
# | ||
# Generate API documentation via docFx | ||
# | ||
# How to run in Docker: | ||
# | ||
# docker run --rm -it \ | ||
# -v /usr/local/share/dotnet/sdk/NuGetFallbackFolder:/usr/local/share/dotnet/sdk/NuGetFallbackFolder \ | ||
# -v "${PWD}":/code \ | ||
# -w /code \ | ||
# tsgkadot/docker-docfx:latest /code/Scripts/generate-docs.sh | ||
# | ||
# How to check generated site: | ||
# | ||
# cd docfx_project/_site | ||
# docker run -it --rm -p 8080:80 --name web -v $PWD:/usr/share/nginx/html nginx | ||
# | ||
|
||
SCRIPT_PATH="$( cd "$(dirname "$0")" || exit ; pwd -P )" | ||
|
||
# | ||
# Remove old docs | ||
# | ||
rm -rf "${SCRIPT_PATH}"/../docfx_project/api || true | ||
rm -rf "${SCRIPT_PATH}"/../docfx_project/_site || true | ||
|
||
# | ||
# Build docs | ||
# | ||
cd "${SCRIPT_PATH}"/../docfx_project || exit | ||
docfx metadata | ||
docfx build |
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,45 @@ | ||
#!/usr/bin/env bash | ||
|
||
# | ||
# Publish site to GitHub Pages | ||
# | ||
# How to run in Docker: | ||
# | ||
# docker run --rm -it \ | ||
# -v "${PWD}/docfx_project":/code/docfx_project \ | ||
# -v "${PWD}/Scripts":/code/Scripts \ | ||
# -v "${PWD}/.circleci":/code/.circleci \ | ||
# -v ~/.ssh:/root/.ssh \ | ||
# -v ~/.gitconfig:/root/.gitconfig \ | ||
# -w /code \ | ||
# ubuntu /code/Scripts/publish-site.sh | ||
# | ||
|
||
set -e | ||
|
||
SCRIPT_PATH="$( cd "$(dirname "$0")" || exit ; pwd -P )" | ||
cd "$SCRIPT_PATH"/.. | ||
|
||
echo "# Install Git" | ||
apt-get update \ | ||
&& apt-get install git --yes \ | ||
|
||
echo "# Clone client and switch to branch for GH-Pages" | ||
git clone [email protected]:influxdata/influxdb-client-csharp.git \ | ||
&& cd influxdb-client-csharp \ | ||
&& git switch -C gh-pages | ||
|
||
echo "# Remove old pages" | ||
rm -r "$SCRIPT_PATH"/../influxdb-client-csharp/* | ||
|
||
echo "# Copy new docs" | ||
cp -Rf "$SCRIPT_PATH"/../docfx_project/_site/* "$SCRIPT_PATH"/../influxdb-client-csharp/ | ||
|
||
echo "# Copy CircleCI" | ||
cp -R "${SCRIPT_PATH}"/../.circleci/ "$SCRIPT_PATH"/../influxdb-client-csharp/ | ||
|
||
echo "# Deploy site" | ||
cd "$SCRIPT_PATH"/../influxdb-client-csharp | ||
git add -f . | ||
git commit -m "Pushed the latest Docs to GitHub pages [skip CI]" | ||
git push -fq origin gh-pages |
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,10 @@ | ||
############### | ||
# folder # | ||
############### | ||
/**/DROP/ | ||
/**/TEMP/ | ||
/**/packages/ | ||
/**/bin/ | ||
/**/obj/ | ||
_site | ||
api |
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,73 @@ | ||
{ | ||
"metadata": [ | ||
{ | ||
"src": [ | ||
{ | ||
"files": [ | ||
"**/Client.Core/**.csproj", | ||
"**/Client/**.csproj", | ||
"**/Client.Legacy/**.csproj", | ||
"**/Client.Linq/**.csproj" | ||
], | ||
"src": ".." | ||
} | ||
], | ||
"dest": "api", | ||
"filter": "filterConfig.yml", | ||
"disableGitFeatures": false, | ||
"properties": { | ||
"TargetFramework": "netstandard2.1" | ||
} | ||
} | ||
], | ||
"build": { | ||
"content": [ | ||
{ | ||
"files": [ | ||
"api/**.yml", | ||
"api/index.md" | ||
] | ||
}, | ||
{ | ||
"files": [ | ||
"toc.yml", | ||
"*.md" | ||
] | ||
} | ||
], | ||
"resource": [ | ||
{ | ||
"files": [ | ||
"images/**", | ||
"favicon.ico" | ||
] | ||
} | ||
], | ||
"overwrite": [ | ||
{ | ||
"files": [ | ||
], | ||
"exclude": [ | ||
"obj/**", | ||
"_site/**" | ||
] | ||
} | ||
], | ||
"dest": "_site", | ||
"globalMetadataFiles": [], | ||
"fileMetadataFiles": [], | ||
"template": [ | ||
"statictoc" | ||
], | ||
"globalMetadata": { | ||
"_appLogoPath": "images/influxdata-logo--symbol--white.png", | ||
"_disableContribution": true | ||
}, | ||
"postProcessors": [], | ||
"markdownEngineName": "markdig", | ||
"noLangKeyword": false, | ||
"keepFileLink": false, | ||
"cleanupCacheHistory": false, | ||
"disableGitFeatures": false | ||
} | ||
} |
Binary file not shown.
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,13 @@ | ||
apiRules: | ||
- exclude: | ||
uidRegex: ^InfluxDB\.Client\.Api\.Client$ | ||
type: Namespace | ||
- exclude: | ||
uidRegex: ^InfluxDB\.Client\.Configurations$ | ||
type: Namespace | ||
- exclude: | ||
uidRegex: ^InfluxDB\.Client\.Core\.Internal$ | ||
type: Namespace | ||
- exclude: | ||
uidRegex: ^InfluxDB\.Client\.Core\.Flux\.Internal$ | ||
type: Namespace |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,7 @@ | ||
# influxdb-client-csharp | ||
|
||
| Client | Description | API | | ||
| --- | --- | --- | | ||
| `Client` | The reference C# client that allows query, write and InfluxDB 2.0 management. | [InfluxDB.Client.html](api/InfluxDB.Client.yml)| | ||
| `Client.Linq` | The library supports to use a LINQ expression to query the InfluxDB. | [InfluxDB.Client.Linq.html](api/InfluxDB.Client.Linq.yml) | | ||
| `Client.Legacy` | The reference C# client that allows you to perform Flux queries against InfluxDB 1.7+. | [InfluxDB.Client.Flux.html](api/InfluxDB.Client.Flux.yml) | |
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,3 @@ | ||
- name: InfluxDB.Client API | ||
href: api/ | ||
homepage: api/InfluxDB.Client.yml |