Files
notes/.gitea/workflows/deploy.yaml
Jay 9b4115aafc
All checks were successful
Build and Deploy Notes / build (push) Successful in 17s
update workflow
2026-03-02 18:21:18 +00:00

43 lines
1.1 KiB
YAML

name: Build and Deploy Notes
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest # this will use your runner container
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python and MkDocs
run: |
apt-get update
apt-get install -y python3-pip
pip3 install --upgrade pip
pip3 install mkdocs-material
- name: Build site with MkDocs
run: |
# Ensure we are in the directory containing mkdocs.yml
mkdocs build --clean --site-dir ./dist
- name: Deploy to host-mounted folder
run: |
# 1. Verify the build output exists
if [ ! -d "./dist" ]; then
echo "Error: Build directory ./dist does not exist!"
exit 1
fi
# 2. Ensure destination exists (this is the host-mounted volume)
mkdir -p /notes
# 3. Copy contents from ./dist to /notes
cp -v -R ./dist/* /notes/
# 4. Sync to ensure data is written to disk
sync