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