From 43f1bb4d85bbde7a722298500bf6ffa9a9492dbd Mon Sep 17 00:00:00 2001 From: Mayuki Sawatari Date: Wed, 13 May 2020 11:05:54 +0900 Subject: [PATCH 1/3] Generate and publish documentation to GitHub Pages --- .github/workflows/build-docs.yml | 31 ++++++++++++++ docs/.gitignore | 10 +++++ docs/api/.gitignore | 5 +++ docs/docfx.json | 70 ++++++++++++++++++++++++++++++++ docs/index.md | 8 ++++ docs/toc.yml | 7 ++++ 6 files changed, 131 insertions(+) create mode 100644 .github/workflows/build-docs.yml create mode 100644 docs/.gitignore create mode 100644 docs/api/.gitignore create mode 100644 docs/docfx.json create mode 100644 docs/index.md create mode 100644 docs/toc.yml 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..5aa0377 --- /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..a301e13 --- /dev/null +++ b/docs/toc.yml @@ -0,0 +1,7 @@ +- 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 \ No newline at end of file From e1a4aeb9da362879f673a2914aedc0f48226b451 Mon Sep 17 00:00:00 2001 From: Mayuki Sawatari Date: Wed, 13 May 2020 11:09:24 +0900 Subject: [PATCH 2/3] Update toc.yml --- docs/toc.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/toc.yml b/docs/toc.yml index a301e13..76724ac 100644 --- a/docs/toc.yml +++ b/docs/toc.yml @@ -4,4 +4,8 @@ - name: Repository href: https://github.com/Cysharp/UniTask - homepage: https://github.com/Cysharp/UniTask \ No newline at end of file + 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 From 1d5ecbb3ab9a293c6e9be24ed8924fadcb96efe3 Mon Sep 17 00:00:00 2001 From: Mayuki Sawatari Date: Wed, 13 May 2020 11:42:05 +0900 Subject: [PATCH 3/3] Include sub-directory source codes --- docs/docfx.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docfx.json b/docs/docfx.json index 5aa0377..4251d8d 100644 --- a/docs/docfx.json +++ b/docs/docfx.json @@ -4,7 +4,7 @@ "src": [ { "files": [ - "UniTask/Assets/Plugins/UniTask/Runtime/*.cs" + "UniTask/Assets/Plugins/UniTask/Runtime/**/*.cs" ], "src": "../src" }