diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml new file mode 100644 index 0000000..c64a79a --- /dev/null +++ b/.github/workflows/build-docs.yml @@ -0,0 +1,31 @@ +name: build-docs + +on: + push: + branches: + - master + - feature/docs + +jobs: + run-docfx: + if: "!(contains(github.event.head_commit.message, '[skip ci]') || contains(github.event.head_commit.message, '[ci skip]'))" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/checkout@v2 + with: + repository: Cysharp/DocfxTemplate + path: docs/_DocfxTemplate + - uses: Kirbyrawr/docfx-action@master + name: Docfx metadata + with: + args: metadata docs/docfx.json + - uses: Kirbyrawr/docfx-action@master + name: Docfx build + with: + args: build docs/docfx.json + - name: Publish 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/docs/.gitignore b/docs/.gitignore new file mode 100644 index 0000000..4ad1699 --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1,10 @@ +############### +# folder # +############### +/**/DROP/ +/**/TEMP/ +/**/packages/ +/**/bin/ +/**/obj/ +_site +_DocfxTemplate \ No newline at end of file diff --git a/docs/api/.gitignore b/docs/api/.gitignore new file mode 100644 index 0000000..e8079a3 --- /dev/null +++ b/docs/api/.gitignore @@ -0,0 +1,5 @@ +############### +# temp file # +############### +*.yml +.manifest diff --git a/docs/docfx.json b/docs/docfx.json new file mode 100644 index 0000000..4251d8d --- /dev/null +++ b/docs/docfx.json @@ -0,0 +1,70 @@ +{ + "metadata": [ + { + "src": [ + { + "files": [ + "UniTask/Assets/Plugins/UniTask/Runtime/**/*.cs" + ], + "src": "../src" + } + ], + "dest": "api", + "disableGitFeatures": false, + "disableDefaultFilter": false + } + ], + "build": { + "globalMetadata": { + "_disableContribution": true, + "_appTitle": "UniTask" + }, + "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": [ + "_DocfxTemplate/templates/default-v2.5.2", + "_DocfxTemplate/templates/cysharp" + ], + "postProcessors": [], + "markdownEngineName": "markdig", + "noLangKeyword": false, + "keepFileLink": false, + "cleanupCacheHistory": false + } +} \ No newline at end of file diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..28d318c --- /dev/null +++ b/docs/index.md @@ -0,0 +1,8 @@ +--- +title: Home +--- +# UniTask + +Provides an efficient async/await integration to Unity. + +https://github.com/Cysharp/UniTask diff --git a/docs/toc.yml b/docs/toc.yml new file mode 100644 index 0000000..76724ac --- /dev/null +++ b/docs/toc.yml @@ -0,0 +1,11 @@ +- name: API Documentation + href: api/ + homepage: api/Cysharp.Threading.Tasks.html + +- name: Repository + href: https://github.com/Cysharp/UniTask + homepage: https://github.com/Cysharp/UniTask + +- name: Releases + href: https://github.com/Cysharp/UniTask/releases + homepage: https://github.com/Cysharp/UniTask/releases \ No newline at end of file