mirror of
https://github.com/marceloprates/prettymaps.git
synced 2025-08-30 17:50:13 +02:00
Enhance GitHub Actions workflow for site deployment and initiate documentation structure for Prettymaps.
This commit is contained in:
17
.github/workflows/docs.yml
vendored
17
.github/workflows/docs.yml
vendored
@@ -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
5
docs/api.md
Normal 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
3
docs/index.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Prettymaps Documentation
|
||||
|
||||
Welcome to the Prettymaps documentation site.
|
5
docs/usage.md
Normal file
5
docs/usage.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# Usage
|
||||
|
||||
This page will describe how to use Prettymaps.
|
||||
|
||||
_More details coming soon!_
|
Reference in New Issue
Block a user