Skip to content

Commit ccba547

Browse files
committed
Initial commit
0 parents  commit ccba547

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+2162
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Deploy MkDocs to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- site
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: "pages"
16+
cancel-in-progress: false
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Setup Python
26+
uses: actions/setup-python@v5
27+
with:
28+
python-version: '3.12'
29+
30+
- name: Install dependencies
31+
run: pip install -r requirements.txt
32+
33+
- name: Build site
34+
run: mkdocs build
35+
36+
- name: Upload artifact
37+
uses: actions/upload-pages-artifact@v3
38+
with:
39+
path: ./site
40+
41+
deploy:
42+
environment:
43+
name: github-pages
44+
url: ${{ steps.deployment.outputs.page_url }}
45+
runs-on: ubuntu-latest
46+
needs: build
47+
steps:
48+
- name: Deploy to GitHub Pages
49+
id: deployment
50+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Build artifacts
2+
site/
3+
4+
# Python virtual environment
5+
.venv/
6+
venv/
7+
env/
8+
9+
# Python cache
10+
__pycache__/
11+
*.py[cod]
12+
*$py.class
13+
14+
# IDE
15+
.vscode/
16+
.idea/
17+
18+
# OS
19+
.DS_Store
20+
Thumbs.db

README.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Modules - Site Branch
2+
3+
This branch contains the MkDocs build configuration for the MICRORACK Modules documentation.
4+
5+
**⚠️ Do not edit content here directly!** Edit the source markdown files in the `master` branch instead.
6+
7+
## How it works
8+
9+
1. Content is edited in the `master` branch (bare markdown files)
10+
2. GitHub Actions automatically syncs content to this branch
11+
3. MkDocs builds and deploys to GitHub Pages
12+
13+
## Branch Structure
14+
15+
### Master Branch (source - bare markdown)
16+
```
17+
repo/
18+
├── README.md # Index page content
19+
├── LICENSE.md # License file
20+
├── .github/
21+
│ └── workflows/
22+
│ └── sync-to-site.yml # Sync workflow
23+
├── mod-vco/
24+
│ ├── README.md
25+
│ └── mod-vco.png
26+
├── mod-vcf/
27+
│ ├── README.md
28+
│ └── mod-vcf.png
29+
└── ... (other modules)
30+
```
31+
32+
### Site Branch (this branch)
33+
```
34+
repo/
35+
├── README.md # This file
36+
├── mkdocs.yml # MkDocs configuration
37+
├── requirements.txt # Python dependencies
38+
├── scripts/
39+
│ └── convert_admonitions.py
40+
├── .github/
41+
│ └── workflows/
42+
│ └── deploy.yml # Deploy workflow
43+
└── docs/
44+
├── index.md # ← synced from master/README.md
45+
├── LICENSE.md # ← synced from master/LICENSE.md
46+
├── CNAME
47+
├── assets/ # CSS, JS, logos, fonts
48+
└── mod-*/ # ← synced from master/mod-*/
49+
```
50+
51+
## Local Development
52+
53+
```bash
54+
pip install -r requirements.txt
55+
mkdocs serve
56+
```
57+
58+
Visit http://127.0.0.1:8000
59+
60+
## GitHub Configuration
61+
62+
After creating the site branch:
63+
64+
1. **GitHub Pages Settings** (Settings → Pages):
65+
- Source: `GitHub Actions`
66+
67+
2. **Add site branch to allowed deployment branches**:
68+
```bash
69+
gh api repos/OWNER/REPO/environments/github-pages/deployment-branch-policies \
70+
--method POST -f name=site
71+
```
72+
73+
3. **Actions Permissions** (Settings → Actions → General):
74+
- Workflow permissions: Read and write permissions

docs/CNAME

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
modules.microrack.org

0 commit comments

Comments
 (0)