Skip to content

Update mkdocs-shadcn to v0.11.0 and add GeoJSON API documentation #35

Update mkdocs-shadcn to v0.11.0 and add GeoJSON API documentation

Update mkdocs-shadcn to v0.11.0 and add GeoJSON API documentation #35

Workflow file for this run

name: Build and Remote Deploy
on:
push:
branches:
- main
- 'v*'
env:
CURRENT_MAJOR_VERSION: "5.0"
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Source
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
version: "latest"
- name: Set up Python
run: uv python install v3
- name: Configure Git and Fetch Deploy Branch
run: |
git config user.name "github-actions"
git config user.email "github-actions@github.com"
git fetch origin deploy:deploy
- name: Build and Alias
run: |
BRANCH_NAME=${{ github.ref_name }}
# Install everything from pyproject.toml including mike
uv sync
if [ "$BRANCH_NAME" == "main" ]; then
echo "Deploying MAIN as Version ${{ env.CURRENT_MAJOR_VERSION }} (Latest)"
uv run mike deploy --deploy-prefix package -b deploy ${{ env.CURRENT_MAJOR_VERSION }} latest --update-aliases --push
uv run mike set-default latest --push --deploy-prefix package -b deploy
else
# Extracts version from branch name (e.g., v3.0 -> 3.0)
VERSION=$(echo $BRANCH_NAME | sed 's/^v//')
echo "Deploying LEGACY Version: $VERSION"
uv run mike deploy --deploy-prefix package -b deploy $VERSION --push
fi
- name: Switch Workspace to HTML Branch
run: git checkout deploy
- name: Deploy Entire Collection to Server
uses: Burnett01/rsync-deployments@v8
with:
switches: -avzr --delete
path: ./package/
remote_path: ${{ secrets.SERVER_PATH }}
remote_host: ${{ secrets.SERVER_HOST }}
remote_user: ${{ secrets.SERVER_USER }}
remote_key: ${{ secrets.SERVER_SSH_KEY }}
- name: Invalidate Cloudflare Cache
if: success()
run: |
curl -X POST "https://api.cloudflare.com/client/v4/zones/${{ secrets.CLOUDFLARE_ZONE_ID }}/purge_cache" \
-H "Authorization: Bearer ${{ secrets.CLOUDFLARE_API_TOKEN }}" \
-H "Content-Type: application/json" \
--data '{"purge_everything":true}'