Files
notes/.gitea/workflows/deploy.yaml
Jay cb920fe70f
All checks were successful
Build and Deploy MkDocs / deploy (push) Successful in 25s
add workflow
2026-03-03 14:59:32 +00:00

35 lines
1020 B
YAML

name: Build and Deploy MkDocs
on: [push]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Build and Extract Site
run: |
# Build the image (the 'RUN mkdocs build' happens here)
docker build -t mkdocs-temp -f ci/mkdocs/Dockerfile .
# Create a temporary container and copy the 'site' folder out of it
docker create --name temp-container mkdocs-temp
docker cp temp-container:/build/site ./site
docker rm temp-container
- name: Deploy to Branch
run: |
git config user.name "gitea-actions[bot]"
git config user.email "actions@noreply.gitea.io"
# Standard deployment logic
cp -r site /tmp/site_build
git checkout --orphan docs-static
git rm -rf .
cp -r /tmp/site_build/. .
git add .
git commit -m "Automated MkDocs build"
git push origin docs-static --force