Skip to content

Commit

Permalink
chore: add doc generation supports
Browse files Browse the repository at this point in the history
  • Loading branch information
filzrev committed Feb 19, 2024
1 parent dd89b7d commit 1735d71
Show file tree
Hide file tree
Showing 13 changed files with 2,074 additions and 386 deletions.
88 changes: 88 additions & 0 deletions .github/workflows/build-doc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Build document and deploy to GitHub Page

on:
push:
branches: ["main"]
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: true

defaults:
run:
shell: pwsh

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
defaults:
run:
working-directory: ./docs
steps:
# Checkout
- name: Checkout
uses: actions/checkout@v4
# Install docfx as .NET global tools
- name: Install docfx
run: |
dotnet tool install docfx -g
# Run `docfx metadata` command
- name: Generate metadata
run: |
docfx metadata
# Run `docfx build` command
- name: Build document
run: |
docfx build
# Run `docfx pdf` command
- name: Build PDF files
run: |
docfx pdf
# Upload docfx output site
- name: Upload docfx build results to artifacts
uses: actions/upload-artifact@v4
with:
name: wwwroot
path: docs/_site
if-no-files-found: error

# Deploy site contents to GitHub Pages
publish-pages:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
# Setup GitHub Pages
- name: Setup Pages
uses: actions/configure-pages@v4

# Download artifacts
- name: Download artifact
id: download
uses: actions/download-artifact@v4
with:
name: wwwroot
path: temp/wwwroot

# Upload content to GitHub Pages
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ${{steps.download.outputs.download-path}}

# Deploy to GitHub Pages
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
2 changes: 2 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
_site
api
1,864 changes: 1,864 additions & 0 deletions docs/articles/index.md

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/articles/toc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- href: index.md
59 changes: 59 additions & 0 deletions docs/docfx.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"metadata": [
{
"src": [
{
"src": "../src",
"files": [
"**/*.csproj",
"R3.Unity/**.cs"
]
}
],
"properties": {
"TargetFramework": "net8.0" // TODO: `R3.WinUI3` metadata is not generated when using this setting.
},
"dest": "api",
"allowCompilationErrors": true, // This settings is required for Unity projects (that refencing UnityEngine/UnityEditor namespaces)
"outputFormat": "apiPage"
}
],
"build": {
"content": [
{
"files": [
"index.md",
"toc.yml",
"articles/**.{md,yml}",
"api/**.{md,yml}",
],
"exclude": [
"_site/**"
]
}
],
"resource": [
{
"files": [
"images/**"
]
}
],
"output": "_site",
"template": [
"default",
"modern",
"templates/cysharp"
],
"globalMetadata": {
"_appName": "R3",
"_appTitle": "R3",
"_appLogoPath": "public/logo.png",
"_appFaviconPath": "public/favicon.ico",
"_appFooter": "Copyright © <a href=\"https://cysharp.co.jp\">Cysharp</a>, Inc. | <span>Generated by <strong>DocFX</strong></span>",
"_noindex": true, // TODO: It's added to suppress contents crawled by search engine. It need to remove this settings for publish public site.
"_enableSearch": true,
"pdf": true
}
}
}
18 changes: 18 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
layout: landing
---

# R3

[![NuGet](https://img.shields.io/nuget/v/R3.svg)](https://www.nuget.org/packages/R3/)
[![Downloads](https://img.shields.io/nuget/dt/R3.svg)](https://www.nuget.org/packages/R3/)
[![Stars](https://img.shields.io/github/stars/Cysharp/R3?color=brightgreen)](https://github.com/Cysharp/R3/stargazers)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/Cysharp/R3/blob/main/LICENSE)

The new future of [dotnet/reactive](https://github.com/dotnet/reactive/) and [UniRx](https://github.com/neuecc/UniRx).

https://github.com/Cysharp/R3

## License

This library is under the MIT License.
95 changes: 0 additions & 95 deletions docs/reference_factory.md

This file was deleted.

Loading

0 comments on commit 1735d71

Please sign in to comment.