diff --git a/.github/workflows/deploy_doc.yml b/.github/workflows/deploy_doc.yml new file mode 100644 index 0000000..2a0e8f2 --- /dev/null +++ b/.github/workflows/deploy_doc.yml @@ -0,0 +1,28 @@ +name: DocFX Build and Publish + +on: + workflow_dispatch + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup .NET Core + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 8.0.x + + - name: Install DocFX + run: dotnet tool install -g docfx + + - name: Build Documentation + run: docfx docs/docfx.json + + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: docs/_site \ No newline at end of file diff --git a/.gitignore b/.gitignore index b111e13..7f06d86 100644 --- a/.gitignore +++ b/.gitignore @@ -364,4 +364,8 @@ FodyWeavers.xsd /Shinko.cs # VS Code workspace -SoundMaker.code-workspace \ No newline at end of file +SoundMaker.code-workspace + +# API Reference +_site +api \ No newline at end of file diff --git a/docs/docfx.json b/docs/docfx.json new file mode 100644 index 0000000..32d9edc --- /dev/null +++ b/docs/docfx.json @@ -0,0 +1,45 @@ +{ + "metadata": [ + { + "src": [ + { + "src": "../src/SoundMaker", + "files": [ + "**/*.csproj" + ] + } + ], + "dest": "api" + } + ], + "build": { + "content": [ + { + "files": [ + "**/*.{md,yml}" + ], + "exclude": [ + "_site/**" + ] + } + ], + "resource": [ + { + "files": [ + "images/**" + ] + } + ], + "output": "_site", + "template": [ + "default", + "modern" + ], + "globalMetadata": { + "_appName": "SoundMaker API Reference", + "_appTitle": "SoundMaker API Reference", + "_enableSearch": true, + "pdf": false + } + } +} \ No newline at end of file diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..f9859f8 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,11 @@ +--- +_layout: landing +--- + +# 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. \ No newline at end of file diff --git a/docs/markdowns/getting-started.md b/docs/markdowns/getting-started.md new file mode 100644 index 0000000..8b3a794 --- /dev/null +++ b/docs/markdowns/getting-started.md @@ -0,0 +1 @@ +# Getting Started \ No newline at end of file diff --git a/docs/markdowns/introduction.md b/docs/markdowns/introduction.md new file mode 100644 index 0000000..f6ecaa6 --- /dev/null +++ b/docs/markdowns/introduction.md @@ -0,0 +1 @@ +# Introduction \ No newline at end of file diff --git a/docs/markdowns/toc.yml b/docs/markdowns/toc.yml new file mode 100644 index 0000000..d7e9ea8 --- /dev/null +++ b/docs/markdowns/toc.yml @@ -0,0 +1,4 @@ +- name: Introduction + href: introduction.md +- name: Getting Started + href: getting-started.md \ No newline at end of file diff --git a/docs/toc.yml b/docs/toc.yml new file mode 100644 index 0000000..096f523 --- /dev/null +++ b/docs/toc.yml @@ -0,0 +1,4 @@ +- name: Docs + href: markdowns/ +- name: API + href: api/ \ No newline at end of file