You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sedona.apache.org by ji...@apache.org on 2025/09/16 06:17:14 UTC
(sedona-db) 01/01: Update the github action to leverage mike
This is an automated email from the ASF dual-hosted git repository.
jiayu pushed a commit to branch enable-mike
in repository https://gitbox.apache.org/repos/asf/sedona-db.git
commit 32650e9e7eb9261969ca6964a2a7b97e8e41655b
Author: Jia Yu <ji...@gmail.com>
AuthorDate: Mon Sep 15 23:17:08 2025 -0700
Update the github action to leverage mike
---
.github/workflows/packaging.yml | 45 ++++++++++++++++++-----------------------
1 file changed, 20 insertions(+), 25 deletions(-)
diff --git a/.github/workflows/packaging.yml b/.github/workflows/packaging.yml
index 2957a9b..ba4fa47 100644
--- a/.github/workflows/packaging.yml
+++ b/.github/workflows/packaging.yml
@@ -26,6 +26,12 @@ on:
pull_request:
branches:
- main
+ workflow_dispatch:
+ inputs:
+ tag_name:
+ description: 'Git tag name to deploy documentation for a specific release version (e.g., 0.1.0)'
+ required: true
+ type: string
permissions:
contents: read
@@ -138,37 +144,26 @@ jobs:
with:
name: docs
- - name: Clone asf-site branch
- uses: actions/checkout@v4
- with:
- ref: asf-site
- path: pages-clone
-
- - name: Update development documentation
+ - name: Deploy documentation with mike
env:
- DOC_TAG: "dev-snapshot-main"
-
+ TAG_NAME: ${{ github.event.inputs.tag_name }}
run: |
git config --global user.email "actions@github.com"
git config --global user.name "GitHub Actions"
-
- cd pages-clone
- if [ -d "$DOC_TAG" ]; then
- git rm -rf "$DOC_TAG"
+
+ # Extract docs
+ tar -xf docs.tgz
+
+ # Deploy based on trigger type
+ if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
+ # Deploy tagged version and set as latest and default
+ mike deploy --update-aliases $TAG_NAME latest -b asf-site -p
+ mike set-default latest -b asf-site -p
+ else
+ # Deploy development snapshot
+ mike deploy latest-snapshot -b asf-site -p
fi
- tar -xf ../docs.tgz
- mv sedona-db-docs "$DOC_TAG"
-
- git add *
- git commit --allow-empty -m"update documentation for tag $DOC_TAG"
-
- - name: Push development documentation to asf-site
- if: success() && github.repository == 'apache/sedona-db' && github.ref == 'refs/heads/main'
- run: |
- cd pages-clone
- git push
-
create-release:
runs-on: ubuntu-latest
needs: