This commit is contained in:
@@ -12,33 +12,18 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
|
||||||
fetch-depth: 0 # Important for switching branches
|
|
||||||
|
|
||||||
- name: Build and Extract Site
|
- name: Build and Extract Site
|
||||||
run: |
|
run: |
|
||||||
docker build -t mkdocs-temp -f ci/mkdocs/Dockerfile .
|
docker build -t mkdocs-temp -f ci/mkdocs/Dockerfile .
|
||||||
docker create --name temp-container mkdocs-temp
|
docker create --name temp-container mkdocs-temp
|
||||||
# Copying content to a folder named 'output_content' to avoid naming collisions
|
|
||||||
docker cp temp-container:/build/site ./output_content
|
docker cp temp-container:/build/site ./output_content
|
||||||
docker rm temp-container
|
docker rm temp-container
|
||||||
|
|
||||||
- name: Deploy to docs-static Branch
|
|
||||||
run: |
|
|
||||||
git config user.name "gitea-actions[bot]"
|
|
||||||
git config user.email "actions@noreply.gitea.io"
|
|
||||||
|
|
||||||
# Increase buffer to handle larger media files
|
|
||||||
git config http.postBuffer 524288000
|
|
||||||
|
|
||||||
mv output_content /tmp/site_final
|
mv output_content /tmp/site_final
|
||||||
git fetch origin docs-static
|
|
||||||
git checkout docs-static || git checkout --orphan docs-static
|
|
||||||
cp -r /tmp/site_final/. .
|
|
||||||
|
|
||||||
# Optional: Remove source maps to save space
|
- name: Deploy to Static volume
|
||||||
find . -name "*.map" -type f -delete
|
run: |
|
||||||
|
rm -rf /site_output/*
|
||||||
|
|
||||||
git add .
|
cp -r /tmp/site_final/* /site_output/
|
||||||
git commit -m "Automated MkDocs build"
|
|
||||||
git push origin docs-static --force
|
|
||||||
|
|||||||
Reference in New Issue
Block a user