diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml new file mode 100644 index 0000000..c4fcccf --- /dev/null +++ b/.github/workflows/website.yml @@ -0,0 +1,48 @@ +name: Web + +# Your GitHub workflow file under .github/workflows/ +# Trigger the action on push to main +on: + push: + branches: + - main + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + actions: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + publish-docs: + name: Publish + environment: + name: Docs + url: ${{ steps.deployment.outputs.page_url }} + runs-on: windows-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Setup .NET + uses: actions/setup-dotnet@v3 + with: + dotnet-version: 8.x + + - run: dotnet tool update -g docfx + - run: docfx docfx.json + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + # Upload entire repository + path: '_site' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 + diff --git a/.gitignore b/.gitignore index 8a30d25..d28ca7e 100644 --- a/.gitignore +++ b/.gitignore @@ -396,3 +396,8 @@ FodyWeavers.xsd # JetBrains Rider *.sln.iml + +# DocFX + +_site/ +api/ \ No newline at end of file diff --git a/docfx.json b/docfx.json new file mode 100644 index 0000000..41e7449 --- /dev/null +++ b/docfx.json @@ -0,0 +1,46 @@ +{ + "$schema": "https://raw.githubusercontent.com/dotnet/docfx/main/schemas/docfx.schema.json", + "metadata": [ + { + "src": [ + { + "src": "src", + "files": [ + "**/*.csproj" + ] + } + ], + "dest": "api" + } + ], + "build": { + "content": [ + { + "files": [ + "**/*.{md,yml}" + ], + "exclude": [ + "_site/**" + ] + } + ], + "resource": [ + { + "files": [ + "images/**" + ] + } + ], + "output": "_site", + "template": [ + "default", + "modern" + ], + "globalMetadata": { + "_appName": "CubeKit", + "_appTitle": "CubeKit", + "_enableSearch": true, + "pdf": true + } + } +} \ No newline at end of file diff --git a/docs/getting-started.md b/docs/getting-started.md new file mode 100644 index 0000000..8b3a794 --- /dev/null +++ b/docs/getting-started.md @@ -0,0 +1 @@ +# Getting Started \ No newline at end of file diff --git a/docs/introduction.md b/docs/introduction.md new file mode 100644 index 0000000..f6ecaa6 --- /dev/null +++ b/docs/introduction.md @@ -0,0 +1 @@ +# Introduction \ No newline at end of file diff --git a/docs/toc.yml b/docs/toc.yml new file mode 100644 index 0000000..d7e9ea8 --- /dev/null +++ b/docs/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/index.md b/index.md new file mode 100644 index 0000000..847af7b --- /dev/null +++ b/index.md @@ -0,0 +1,4 @@ +--- +_layout: landing +redirect_url: README.html +--- \ No newline at end of file diff --git a/toc.yml b/toc.yml new file mode 100644 index 0000000..061acc6 --- /dev/null +++ b/toc.yml @@ -0,0 +1,4 @@ +- name: Docs + href: docs/ +- name: API + href: api/ \ No newline at end of file