Skip to content

Commit 41a0862

Browse files
committed
👷 Add documents.
1 parent 2bf3ce6 commit 41a0862

31 files changed

+5421
-2
lines changed

.gitattributes

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Documentation site assets (not source code)
2+
docs/landing/** linguist-documentation
3+
docs/**/book.toml linguist-documentation
4+
docs/**/SUMMARY.md linguist-documentation
5+
.github/workflows/docs.yml linguist-documentation

.github/workflows/docs.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Deploy Documentation
2+
3+
on:
4+
push:
5+
branches: [next]
6+
paths:
7+
- 'docs/**'
8+
- '.github/workflows/docs.yml'
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: read
13+
pages: write
14+
id-token: write
15+
16+
concurrency:
17+
group: "pages"
18+
cancel-in-progress: true
19+
20+
jobs:
21+
build:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v4
25+
26+
- name: Setup mdBook
27+
uses: peaceiris/actions-mdbook@v2
28+
with:
29+
mdbook-version: '0.5.2'
30+
31+
- name: Build English docs
32+
run: mdbook build docs/en
33+
34+
- name: Build Simplified Chinese docs
35+
run: mdbook build docs/zh-hans
36+
37+
- name: Build Traditional Chinese docs
38+
run: mdbook build docs/zh-hant
39+
40+
- name: Assemble site
41+
run: |
42+
mkdir -p _site
43+
cp docs/landing/index.html _site/
44+
cp -r target/docs/en _site/en
45+
cp -r target/docs/zh-hans _site/zh-hans
46+
cp -r target/docs/zh-hant _site/zh-hant
47+
echo "yuuka.celestia.world" > _site/CNAME
48+
49+
- name: Upload Pages artifact
50+
uses: actions/upload-pages-artifact@v3
51+
with:
52+
path: _site
53+
54+
deploy:
55+
needs: build
56+
runs-on: ubuntu-latest
57+
environment:
58+
name: github-pages
59+
url: ${{ steps.deployment.outputs.page_url }}
60+
steps:
61+
- name: Deploy to GitHub Pages
62+
id: deployment
63+
uses: actions/deploy-pages@v4

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<img src="splash.png" alt="yuuka" />
1+
# Yuuka
2+
3+
![yuuka](splash.png)
24

35
![Crates.io License](https://img.shields.io/crates/l/yuuka)
46
[![Crates.io Version](https://img.shields.io/crates/v/yuuka)](https://docs.rs/yuuka)
@@ -56,4 +58,4 @@ let config = auto!(GameDevelopment {
5658
});
5759
```
5860

59-
More information can be found in the documentation ([English](https://github.com/celestia-island/yuuka/tree/master/docs/introduction.md) | [简体中文](https://github.com/celestia-island/yuuka/tree/master/i18n/zh-hans/introduction.md) | [繁體中文](https://github.com/celestia-island/yuuka/tree/master/i18n/zh-hant/introduction.md)).
61+
More information can be found in the documentation ([English](https://github.com/celestia-island/yuuka/tree/next/docs/en/introduction.md) | [简体中文](https://github.com/celestia-island/yuuka/tree/next/docs/zh-hans/introduction.md) | [繁體中文](https://github.com/celestia-island/yuuka/tree/next/docs/zh-hant/introduction.md)).

docs/en/SUMMARY.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Summary
2+
3+
[Introduction](./introduction.md)
4+
5+
---
6+
7+
- [derive_struct!](./derive-struct.md)
8+
- [derive_enum!](./derive-enum.md)
9+
- [auto!](./auto-macro.md)
10+
- [Attributes & Advanced Features](./attributes.md)
11+
- [Examples](./examples.md)

0 commit comments

Comments
 (0)