dms #1
@@ -1,4 +1,5 @@
|
|||||||
name: Build and Deploy Notes
|
name: Build and Deploy Notes
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
@@ -7,22 +8,32 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
# Step 1: Checkout your repo
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Build with MkDocs Material
|
# Step 2: Install Python + MkDocs Material
|
||||||
# This runs ONLY this step inside the mkdocs container
|
- name: Setup Python and MkDocs
|
||||||
uses: docker://squidfunk/mkdocs-material:latest
|
|
||||||
with:
|
|
||||||
args: build
|
|
||||||
|
|
||||||
- name: Deploy to Web Folder
|
|
||||||
run: |
|
run: |
|
||||||
mkdir -p /notes
|
python3 -m pip install --upgrade pip
|
||||||
if [ -d "site" ]; then
|
pip install mkdocs-material
|
||||||
cp -R site/* /notes/
|
|
||||||
|
# Step 3: Build the static site
|
||||||
|
- name: Build site with MkDocs
|
||||||
|
run: |
|
||||||
|
if [ -f "mkdocs.yml" ]; then
|
||||||
|
mkdocs build
|
||||||
else
|
else
|
||||||
echo "Error: site directory not found!"
|
echo "mkdocs.yml not found!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
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/
|
||||||
|
|||||||
Reference in New Issue
Block a user