Skip to content

Commit

Permalink
Merge pull request #31 from AutumnSky1010/prepare/#30
Browse files Browse the repository at this point in the history
#30 Prepare DocFX
  • Loading branch information
AutumnSky1010 authored Sep 20, 2024
2 parents 877ee56 + 9fbc488 commit 056599c
Show file tree
Hide file tree
Showing 8 changed files with 99 additions and 1 deletion.
28 changes: 28 additions & 0 deletions .github/workflows/deploy_doc.yml
Original file line number Diff line number Diff line change
@@ -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
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -364,4 +364,8 @@ FodyWeavers.xsd
/Shinko.cs

# VS Code workspace
SoundMaker.code-workspace
SoundMaker.code-workspace

# API Reference
_site
api
45 changes: 45 additions & 0 deletions docs/docfx.json
Original file line number Diff line number Diff line change
@@ -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
}
}
}
11 changes: 11 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -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.
1 change: 1 addition & 0 deletions docs/markdowns/getting-started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Getting Started
1 change: 1 addition & 0 deletions docs/markdowns/introduction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Introduction
4 changes: 4 additions & 0 deletions docs/markdowns/toc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- name: Introduction
href: introduction.md
- name: Getting Started
href: getting-started.md
4 changes: 4 additions & 0 deletions docs/toc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- name: Docs
href: markdowns/
- name: API
href: api/

0 comments on commit 056599c

Please sign in to comment.