42 lines
935 B
YAML
42 lines
935 B
YAML
name: Build and Deploy Notes
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
# Step 1: Checkout your repo
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
# Step 2: Install Python + MkDocs Material
|
|
- name: Setup Python and MkDocs
|
|
run: |
|
|
apt-get update
|
|
apt-get install -y python3-pip
|
|
pip3 install --upgrade pip
|
|
pip3 install mkdocs-material
|
|
|
|
# Step 3: Build the static site
|
|
- name: Build site with MkDocs
|
|
run: |
|
|
if [ -f "mkdocs.yaml" ]; then
|
|
mkdocs build
|
|
else
|
|
echo "mkdocs.yml not found!"
|
|
exit 1
|
|
fi
|
|
|
|
# Step 4: Deploy to host-mounted folder
|
|
- name: Deploy to Web Folder
|
|
run: |
|
|
# Ensure target exists
|
|
mkdir -p /notes
|
|
# Copy generated site files
|
|
cp -R site/* /notes/
|