Skip to content

Commit 07def67

Browse files
building tutorials as mkdocs pages (#2011)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 048633a commit 07def67

File tree

3 files changed

+39
-0
lines changed

3 files changed

+39
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Deploy MkDocs
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
permissions:
8+
contents: write
9+
10+
jobs:
11+
deploy:
12+
runs-on: ubuntu-24.04
13+
steps:
14+
# Step 1: Checkout the repository
15+
- uses: actions/checkout@v4
16+
17+
# Step 2: Set up Python
18+
- uses: actions/setup-python@v5
19+
with:
20+
python-version: "3.x"
21+
cache: "pip"
22+
23+
# Step 3: Install MkDocs and dependencies
24+
- run: pip install mkdocs mkdocs-material mkdocs-pagetree-plugin
25+
# Step 4: Deploy to GitHub Pages
26+
- run: |
27+
mkdir -p gh-pages/docs
28+
cp -r tutorials/* gh-pages/docs
29+
cd gh-pages
30+
mv docs/mkdocs.yml mkdocs.yml
31+
echo "{{ pagetree }}" > docs/index.md
32+
mkdocs gh-deploy --force
File renamed without changes.

tutorials/mkdocs.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
site_name: LitGPT Tutorials
2+
3+
plugins:
4+
- pagetree
5+
6+
theme:
7+
name: material

0 commit comments

Comments
 (0)