Skip to content

Commit

Permalink
documentation init with docfx
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanuelmathot committed Sep 9, 2020
1 parent 101198d commit 595e9ca
Show file tree
Hide file tree
Showing 11 changed files with 649 additions and 26 deletions.
43 changes: 36 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,39 @@
language: csharp
dist: xenial
mono: none
dotnet: 3.0
solution: "./src/DotNetStac.sln"
install:
- dotnet restore src/
script:
- dotnet build src/
- dotnet test src/DotNetStac.Test
dotnet: 3.1
jobs:
include:
- stage: "Build"
if: branch != master OR branch != docs
solution: "./src/DotNetStac.sln"
install: dotnet restore src/
script: dotnet build src/
- stage: "Generate Documentation"
if: branch = master OR branch = docs
install:
- dotnet restore
- nuget install docfx.console -Version 2.51.0
script:
- ./docfx.console.2.51.0/tools/docfx.exe metadata docfx_project/docfx.json
- ./docfx.console.2.51.0/tools/docfx.exe build docfx_project/docfx.json
deploy:
provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN
keep_history: true
local_dir: docs/_site
on:
branch: master
- stage: "Run Tests"
if: branch != master OR branch != docs
install: dotnet restore
script: dotnet test src/DotNetStac.Test/DotNetStac.Test.csproj --verbosity detailed
- stage: "Publish to NuGet"
if: branch = master
install: dotnet restore
script:
- dotnet build
- dotnet publish -c release
- dotnet pack -c release --include-symbols -o publish
- dotnet nuget push publish/*.nupkg --skip-duplicate -k $NUGET_TOKEN -s https://api.nuget.org/v3/index.json
9 changes: 9 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
###############
# folder #
###############
/**/DROP/
/**/TEMP/
/**/packages/
/**/bin/
/**/obj/
_site
5 changes: 5 additions & 0 deletions docs/api/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
###############
# temp file #
###############
*.yml
.manifest
2 changes: 2 additions & 0 deletions docs/api/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# PLACEHOLDER
TODO: Add .NET projects to the *src* folder and run `docfx` to generate **REAL** *API Documentation*!
1 change: 1 addition & 0 deletions docs/articles/intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Add your introductions here!
2 changes: 2 additions & 0 deletions docs/articles/toc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- name: Introduction
href: intro.md
68 changes: 68 additions & 0 deletions docs/docfx.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"metadata": [
{
"src": [
{
"files": [
"**/**.csproj"
],
"exclude": [
"*Test*/**.csproj"
],
"src": ".."
}
],
"dest": "api",
"disableGitFeatures": false,
"disableDefaultFilter": false
}
],
"build": {
"content": [
{
"files": [
"api/**.yml",
"api/index.md"
]
},
{
"files": [
"articles/**.md",
"articles/**/toc.yml",
"toc.yml",
"*.md"
]
}
],
"resource": [
{
"files": [
"images/**"
]
}
],
"overwrite": [
{
"files": [
"apidoc/**.md"
],
"exclude": [
"obj/**",
"_site/**"
]
}
],
"dest": "_site",
"globalMetadataFiles": [],
"fileMetadataFiles": [],
"template": [
"default"
],
"postProcessors": [],
"markdownEngineName": "markdig",
"noLangKeyword": false,
"keepFileLink": false,
"cleanupCacheHistory": false,
"disableGitFeatures": false
}
}
4 changes: 4 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# This is the **HOMEPAGE**.
Refer to [Markdown](http://daringfireball.net/projects/markdown/) for how to write markdown files.
## Quick Start Notes:
1. Add images to the *images* folder if the file is referencing an image.
5 changes: 5 additions & 0 deletions docs/toc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- name: Articles
href: articles/
- name: Api Documentation
href: api/
homepage: api/index.md
Loading

0 comments on commit 595e9ca

Please sign in to comment.