Skip to content

Commit cc016ea

Browse files
authored
Merge pull request #1 from socratic-shell/copilot/fix-dcd176a0-fab1-4518-a0c3-496e57a7bde2
Create mdbook documentation structure with GitHub Pages deployment
2 parents d96944a + da17e75 commit cc016ea

File tree

9 files changed

+671
-0
lines changed

9 files changed

+671
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Deploy mdbook to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
10+
permissions:
11+
contents: read
12+
pages: write
13+
id-token: write
14+
15+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
16+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
17+
concurrency:
18+
group: "pages"
19+
cancel-in-progress: false
20+
21+
jobs:
22+
build:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v4
26+
27+
- name: Install mdBook
28+
run: |
29+
mkdir mdbook
30+
curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.40/mdbook-v0.4.40-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook
31+
echo `pwd`/mdbook >> $GITHUB_PATH
32+
33+
- name: Build book
34+
run: mdbook build
35+
36+
- name: Setup Pages
37+
uses: actions/configure-pages@v4
38+
if: github.event_name != 'pull_request'
39+
40+
- name: Upload artifact
41+
uses: actions/upload-pages-artifact@v3
42+
if: github.event_name != 'pull_request'
43+
with:
44+
path: './book'
45+
46+
deploy:
47+
if: github.event_name != 'pull_request'
48+
environment:
49+
name: github-pages
50+
url: ${{ steps.deployment.outputs.page_url }}
51+
runs-on: ubuntu-latest
52+
needs: build
53+
steps:
54+
- name: Deploy to GitHub Pages
55+
id: deployment
56+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# mdbook output
2+
book/
3+
4+
# Temporary files
5+
*.tmp
6+
.DS_Store

LICENSE-APACHE

Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
Apache License
2+
Version 2.0, January 2004
3+
http://www.apache.org/licenses/
4+
5+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6+
7+
1. Definitions.
8+
9+
"License" shall mean the terms and conditions for use, reproduction,
10+
and distribution as defined by Sections 1 through 9 of this document.
11+
12+
"Licensor" shall mean the copyright owner or entity granting the License.
13+
14+
"Legal Entity" shall mean the union of the acting entity and all
15+
other entities that control, are controlled by, or are under common
16+
control with that entity. For the purposes of this definition,
17+
"control" means (i) the power, direct or indirect, to cause the
18+
direction or management of such entity, whether by contract or
19+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
20+
outstanding shares, or (iii) beneficial ownership of such entity.
21+
22+
"You" (or "Your") shall mean an individual or Legal Entity
23+
exercising permissions granted by this License.
24+
25+
"Source" form shall mean the preferred form for making modifications,
26+
including but not limited to source code, documentation files, and
27+
configuration files.
28+
29+
"Object" form shall mean any form resulting from mechanical
30+
transformation or translation of a Source form, including but
31+
not limited to compiled object code, generated documentation,
32+
and conversions to other media types.
33+
34+
"Work" shall mean the work of authorship, whether in Source or
35+
Object form, made available under the License, as indicated by a
36+
copyright notice that is included in or attached to the work
37+
(which shall not include Communications that are conspicuously
38+
marked or otherwise designated in writing by the copyright owner
39+
as "Not a Work").
40+
41+
"Derivative Works" shall mean any work, whether in Source or Object
42+
form, that is based upon (or derived from) the Work and for which the
43+
editorial revisions, annotations, elaborations, or other modifications
44+
represent, as a whole, an original work of authorship. For the purposes
45+
of this License, Derivative Works shall not include works that remain
46+
separable from, or merely link (or bind by name) to the interfaces of,
47+
the Work and for which the separate contributions constituting Derivative
48+
Works that do not fall under this definition may be used under the terms
49+
of their respective licenses.
50+
51+
2. Grant of Copyright License. Subject to the terms and conditions of
52+
this License, each Contributor hereby grants to You a perpetual,
53+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
54+
copyright license to use, reproduce, modify, distribute, sublicense,
55+
and/or sell copies of the Work, and to permit persons to whom the
56+
Work is furnished to do so, subject to the following conditions:
57+
58+
The above copyright notice and this permission notice shall be
59+
included in all copies or substantial portions of the Work.
60+
61+
3. Grant of Patent License. Subject to the terms and conditions of
62+
this License, each Contributor hereby grants to You a perpetual,
63+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
64+
(except as stated in this section) patent license to make, have made,
65+
use, offer to sell, sell, import, and otherwise transfer the Work,
66+
where such license applies only to those patent claims licensable
67+
by such Contributor that are necessarily infringed by their
68+
Contribution(s) alone or by combination of their Contribution(s)
69+
with the Work to which such Contribution(s) was submitted. If You
70+
institute patent litigation against any entity (including a
71+
cross-claim or counterclaim in a lawsuit) alleging that the Work
72+
or a Contribution incorporated within the Work constitutes direct
73+
or contributory patent infringement, then any patent licenses
74+
granted to You under this License for that Work shall terminate
75+
as of the date such litigation is filed.
76+
77+
4. Redistribution. You may reproduce and distribute copies of the
78+
Work or Derivative Works thereof in any medium, with or without
79+
modifications, and in Source or Object form, provided that You
80+
meet the following conditions:
81+
82+
(a) You must give any other recipients of the Work or
83+
Derivative Works a copy of this License; and
84+
85+
(b) You must cause any modified files to carry prominent notices
86+
stating that You changed the files; and
87+
88+
(c) You must retain, in the Source form of any Derivative Works
89+
that You distribute, all copyright, trademark, patent,
90+
attribution and other notices from the Source form of the Work,
91+
excluding those notices that do not pertain to any part of
92+
the Derivative Works; and
93+
94+
(d) If the Work includes a "NOTICE" file as part of its
95+
distribution, then any Derivative Works that You distribute must
96+
include a readable copy of the attribution notices contained
97+
within such NOTICE file, excluding those notices that do not
98+
pertain to any part of the Derivative Works, in at least one
99+
of the following places: within a NOTICE text file distributed
100+
as part of the Derivative Works; within the Source form or
101+
documentation, if provided along with the Derivative Works; or,
102+
within a display generated by the Derivative Works, if and
103+
wherever such third-party notices normally appear. The contents
104+
of the NOTICE file are for informational purposes only and
105+
do not modify the License. You may add Your own attribution
106+
notices within Derivative Works that You distribute, alongside
107+
or as an addendum to the NOTICE text from the Work, provided
108+
that such additional attribution notices cannot be construed
109+
as modifying the License.
110+
111+
You may add Your own copyright notice to Your modifications and
112+
may provide additional or different license terms and conditions
113+
for use, reproduction, or distribution of Your modifications, or
114+
for any such Derivative Works as a whole, provided Your use,
115+
reproduction, and distribution of the Work otherwise complies with
116+
the conditions stated in this License.
117+
118+
5. Submission of Contributions. Unless You explicitly state otherwise,
119+
any Contribution intentionally submitted for inclusion in the Work
120+
by You to the Licensor shall be under the terms and conditions of
121+
this License, without any additional terms or conditions.
122+
Notwithstanding the above, nothing herein shall supersede or modify
123+
the terms of any separate license agreement you may have executed
124+
with Licensor regarding such Contributions.
125+
126+
6. Trademarks. This License does not grant permission to use the trade
127+
names, trademarks, service marks, or product names of the Licensor,
128+
except as required for reasonable and customary use in describing the
129+
origin of the Work and reproducing the content of the NOTICE file.
130+
131+
7. Disclaimer of Warranty. Unless required by applicable law or
132+
agreed to in writing, Licensor provides the Work (and each
133+
Contributor provides its Contributions) on an "AS IS" BASIS,
134+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
135+
implied, including, without limitation, any warranties or conditions
136+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
137+
PARTICULAR PURPOSE. You are solely responsible for determining the
138+
appropriateness of using or redistributing the Work and assume any
139+
risks associated with Your exercise of permissions under this License.
140+
141+
8. Limitation of Liability. In no event and under no legal theory,
142+
whether in tort (including negligence), contract, or otherwise,
143+
unless required by applicable law (such as deliberate and grossly
144+
negligent acts) or agreed to in writing, shall any Contributor be
145+
liable to You for damages, including any direct, indirect, special,
146+
incidental, or consequential damages of any character arising as a
147+
result of this License or out of the use or inability to use the
148+
Work (including but not limited to damages for loss of goodwill,
149+
work stoppage, computer failure or malfunction, or any and all
150+
other commercial damages or losses), even if such Contributor
151+
has been advised of the possibility of such damages.
152+
153+
9. Accepting Warranty or Support. You can choose to offer, and to
154+
charge a fee for, warranty, support, indemnity or other liability
155+
obligations and/or rights consistent with this License. However, in
156+
accepting such obligations, You may act only on Your own behalf and on
157+
Your sole responsibility, not on behalf of any other Contributor, and
158+
only if You agree to indemnify, defend, and hold each Contributor
159+
harmless for any liability incurred by, or claims asserted against,
160+
such Contributor by reason of your accepting any such warranty or support.
161+
162+
END OF TERMS AND CONDITIONS

LICENSE-MIT

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
MIT License
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is
8+
furnished to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
SOFTWARE.

book.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[book]
2+
authors = ["Rust Philosopher Contributors"]
3+
language = "en"
4+
multilingual = false
5+
src = "src"
6+
title = "Rust Philosopher"
7+
description = "A collection of Rust best practices, intended for human and GenAI consumption"
8+
9+
[build]
10+
build-dir = "book"
11+
12+
[output.html]
13+
default-theme = "light"
14+
preferred-dark-theme = "ayu"
15+
git-repository-url = "https://github.com/socratic-shell/rust-philosopher"
16+
edit-url-template = "https://github.com/socratic-shell/rust-philosopher/edit/main/{path}"
17+
site-url = "/rust-philosopher/"

src/SUMMARY.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Summary
2+
3+
- [Welcome](./welcome.md)
4+
- [Reference Material](./reference/README.md)
5+
- [Alice Ryhl's "Actors with Tokio"](./reference/actors-with-tokio.md)

src/reference/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Reference Material
2+
3+
This section contains in-depth articles and reference material covering various Rust topics and patterns.
4+
5+
## Contents
6+
7+
- [Alice Ryhl's "Actors with Tokio"](./actors-with-tokio.md) - A comprehensive guide to building actors with Tokio directly, without using external actor libraries.

0 commit comments

Comments
 (0)