Files
test-mkdocs/.gitea/workflows/deploy-docs.yaml
T
daniel eebd408ac6
Build and Deploy MkDocs / deploy-docs (push) Failing after 4m4s
change workflow
2026-10-11 10:33:42 +02:00

61 lines
1.7 KiB
YAML

name: Build and Deploy MkDocs
on:
push:
branches:
- main
jobs:
deploy-docs:
runs-on: ubuntu-latest
# runs-on: self-hosted
container:
#image: ubuntu:latest
#image: python:3.11
# This community image has node, git, python3, and pip pre-installed
image: catthehacker/ubuntu:runner-22.04
# container runs as a non-root user (usually a user named runner) by default.
option: --user root
volumes:
- /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: |
#export PATH=/home/runner/.local/bin:$PATH
python -m pip install --upgrade pip
pip install mkdocs mkdocs-material
#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)
echo ls site
ls -la site/
# Ensure the mounted directory is recognized inside the container
mkdir -p /var/www/git-pages/test
echo ls var
ls -la /var/www/git-pages/test
# Clear the destination folder first to remove old deleted files
rm -rf /var/www/git-pages/test/*
# Copy everything from the built 'site' folder directly to your web root
cp -R site/* /var/www/git-pages/test/
echo ls var
ls -la /var/www/git-pages/test/