diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..f0dbe9d --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,48 @@ +name: Docs + +on: + push: + branches: [main] + +permissions: + actions: read + pages: write + id-token: write + +concurrency: + group: pages + cancel-in-progress: false + +jobs: + generate-docs: + runs-on: ubuntu-latest + + environment: + name: github-pages + url: ${{ steps.deployment.output.page_url }} + + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Setup .NET + uses: actions/setup-dotnet@v5 + with: + dotnet-version: 10.x + + - name: Build + run: dotnet build -c Release + + - name: DocFX build + working-directory: docs + run: dnx docfx --yes + continue-on-error: false + + - name: Upload assets + uses: actions/upload-pages-artifact@v4 + with: + path: docs/_site + + - name: Deploy + id: deployment + uses: actions/deploy-pages@v4 diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 0000000..ff96cc0 --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1,8 @@ +/**/DROP/ +/**/TEMP/ +/**/packages/ +/**/bin/ +/**/obj/ +_site +/api/*.yml +/api/.manifest diff --git a/docs/docfx.json b/docs/docfx.json new file mode 100644 index 0000000..de860a4 --- /dev/null +++ b/docs/docfx.json @@ -0,0 +1,46 @@ +{ + "$schema": "https://raw.githubusercontent.com/dotnet/docfx/main/schemas/docfx.schema.json", + "metadata": [ + { + "src": [ + { + "src": "../UnityHelper", + "files": [ + "**/*.csproj" + ] + } + ], + "dest": "api" + } + ], + "build": { + "content": [ + { + "files": [ + "**/*.{md,yml}" + ], + "exclude": [ + "_site/**" + ] + } + ], + "resource": [ + { + "files": [ + "images/**" + ] + } + ], + "output": "_site", + "template": [ + "default", + "modern" + ], + "globalMetadata": { + "_appName": "", + "_appTitle": "", + "_enableSearch": true, + "pdf": true + } + } +} \ No newline at end of file diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..7f96fc3 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,21 @@ +--- +_layout: landing +--- + +# About Silksong.UnityHelper + +Silksong.UnityHelper is a library to help with common Unity operations. + +## Usage + +Add the following line to your .csproj: + +``` + +``` + +You will also need to add a dependency to your thunderstore.toml: + +``` +silksong_modding-UnityHelper = "1.1.0" +``` \ No newline at end of file diff --git a/docs/toc.yml b/docs/toc.yml new file mode 100644 index 0000000..a2a2fa2 --- /dev/null +++ b/docs/toc.yml @@ -0,0 +1,2 @@ +- name: API + href: api/ \ No newline at end of file