Files
test-mkdocs/.gitea/workflows/deploy-docs.yaml
T
daniel 60787eb0be
Build and Deploy MkDocs / deploy-docs (push) Successful in 5m46s
change workflow
2026-10-10 21:03:23 +02:00

41 lines
1.1 KiB
YAML

name: Build and Deploy MkDocs
on:
push:
branches:
- main
jobs:
deploy-docs:
runs-on: ubuntu-latest
container:
volume:
- /var/www/git-pages:/var/www/git-pages
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install MkDocs & Plugins
run: |
python -m pip install --root-user-action=ignore --upgrade pip
pip install --root-user-action=ignore mkdocs mkdocs-material
- name: Build Static Site
run: mkdocs build
- name: Deploy to Web Server Folder
run: |
echo user $USER, $(whoami)
ls -la site/
# Ensure the mounted directory is recognized inside the container
mkdir -p /var/www/git-pages
# Clear the destination folder first to remove old deleted files
rm -rf /var/www/git-pages/*
# Copy everything from the built 'site' folder directly to your web root
cp -R site/* /var/www/git-pages/