Enhance GitHub Actions workflow for site deployment and initiate documentation structure for Prettymaps.

This commit is contained in:
Marcelo Prates
2025-05-16 22:10:09 -03:00
parent 4208670245
commit d17dc7d6e0
4 changed files with 22 additions and 8 deletions

View File

@@ -34,17 +34,18 @@ jobs:
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
# Create orphan branch or switch to it
git checkout --orphan site-artifact
# Remove all files (tracked and untracked)
git rm -rf . || true
rm -rf *
# Copy site output to root
cp -r site/* .
# Add a .nojekyll file to prevent GitHub Pages from ignoring files/folders starting with _
# Remove everything except .git
find . -mindepth 1 ! -regex '^./.git\(/.*\)?' -delete
# Check if site/ exists and is not empty
if [ ! -d site ] || [ -z "$(ls -A site)" ]; then
echo "site/ directory does not exist or is empty. MkDocs build may have failed."
exit 1
fi
# Copy site output to root (including hidden files)
cp -a site/. .
touch .nojekyll
git add .
# Only commit if there are files to commit
if git diff --cached --quiet; then
echo 'No changes to commit'
else

5
docs/api.md Normal file
View File

@@ -0,0 +1,5 @@
# API Reference
This page will contain the API reference for Prettymaps.
_More details coming soon!_

3
docs/index.md Normal file
View File

@@ -0,0 +1,3 @@
# Prettymaps Documentation
Welcome to the Prettymaps documentation site.

5
docs/usage.md Normal file
View File

@@ -0,0 +1,5 @@
# Usage
This page will describe how to use Prettymaps.
_More details coming soon!_