building tutorials as mkdocs pages (#2011)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Jirka Borovec
2025-04-10 19:30:50 +02:00
committed by GitHub
co-authored by pre-commit-ci[bot]
parent 048633a7d0
commit 07def67e43
3 changed files with 39 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
name: Deploy MkDocs
on:
push:
branches: [main]
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-24.04
steps:
# Step 1: Checkout the repository
- uses: actions/checkout@v4
# Step 2: Set up Python
- uses: actions/setup-python@v5
with:
python-version: "3.x"
cache: "pip"
# Step 3: Install MkDocs and dependencies
- run: pip install mkdocs mkdocs-material mkdocs-pagetree-plugin
# Step 4: Deploy to GitHub Pages
- run: |
mkdir -p gh-pages/docs
cp -r tutorials/* gh-pages/docs
cd gh-pages
mv docs/mkdocs.yml mkdocs.yml
echo "{{ pagetree }}" > docs/index.md
mkdocs gh-deploy --force
+7
View File
@@ -0,0 +1,7 @@
site_name: LitGPT Tutorials
plugins:
- pagetree
theme:
name: material