This is an automated email from the ASF dual-hosted git repository.

jiayu pushed a commit to branch branch-1.6.1
in repository https://gitbox.apache.org/repos/asf/sedona.git


The following commit(s) were added to refs/heads/branch-1.6.1 by this push:
     new 7a7f12e7c [DOCS] Improve the doc publish process (#1559)
7a7f12e7c is described below

commit 7a7f12e7c039d9f91aa40ff43892b97e704974c0
Author: Jia Yu <[email protected]>
AuthorDate: Sat Aug 24 22:09:50 2024 -0700

    [DOCS] Improve the doc publish process (#1559)
    
    * Improve the doc publish process
    
    * Lint
    
    * Fix failed doc CI
---
 .github/workflows/docs.yml | 12 ++++++++++--
 docs/community/publish.md  | 44 +++++++-------------------------------------
 2 files changed, 17 insertions(+), 39 deletions(-)

diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
index c79509643..dd6bdfb6b 100644
--- a/.github/workflows/docs.yml
+++ b/.github/workflows/docs.yml
@@ -3,6 +3,7 @@ on:
   push:
     branches:
       - master
+      - branch-*
 
   pull_request:
     branches:
@@ -51,10 +52,17 @@ jobs:
       - run: git config --global user.name = "GitHub Action"
       - run: git config --global user.email = "[email protected]"
       - run: mkdocs build
-      - run: git fetch origin website --depth=1
       - name: Deploy the doc to the website branch
         if: ${{ github.event_name != 'pull_request' && github.repository == 
'apache/sedona' }}
-        run: mike deploy latest-snapshot -b website -p
+        run: |
+          if [[ "${GITHUB_REF##*/}" == "master" ]]; then
+            git fetch origin website --depth=1
+            mike deploy latest-snapshot -b website -p
+          elif [[ "${GITHUB_REF##*/}" =~ ^branch-[0-9]+\.[0-9]+\.[0-9]+$ ]]; 
then
+            git fetch origin website --depth=1
+            version="${GITHUB_REF##*/branch-}"
+            mike deploy "$version" -b website -p
+          fi
       - run: mkdir staging
       - run: cp -r site/* staging/
       - uses: actions/upload-artifact@v3
diff --git a/docs/community/publish.md b/docs/community/publish.md
index e4a2f980d..234acb837 100644
--- a/docs/community/publish.md
+++ b/docs/community/publish.md
@@ -397,40 +397,10 @@ Then submit to CRAN using this [web 
form](https://xmpalantir.wu.ac.at/cransubmit
 
 ## 11. Publish the doc website
 
-### Prepare the environment and doc folder
-
-1. Check out the {{ sedona_create_release.current_version }} Git tag on your 
local repo.
-2. Read [Compile documentation website](../setup/compile.md) to set up your 
environment. But don't deploy anything yet.
-3. Add the download link to [Download page](../download.md).
-4. Add the news to `docs/index.md`.
-
-### Generate Javadoc and Scaladoc
-
-Run the following script to build Javadoc and Scaladoc of sedona modules and 
move them to docs/api/javadoc directory.
-
-```bash
-#!/bin/bash
-
-mvn -q clean install -DskipTests
-rm -rf docs/api/javadoc && mkdir -p docs/api/javadoc
-mkdir -p docs/api/javadoc/spark
-mv spark/common/target/apidocs/* docs/api/javadoc/spark
-```
-
-Please use Intellij IDEA to generate Scaladoc for the spark-common module and 
paste to `docs/api/scaladoc/spark`.
-
-Please do not commit these generated docs to Sedona GitHub.
-
-### Compile R html docs
-
-From [GitHub Action docs 
workflow](https://github.com/apache/sedona/actions/workflows/docs.yml), find 
generated-docs of the commit which is right after the release candidate tag. 
Download it and copy this folder `docs/api/rdocs` to the same location of the 
Sedona to-be-released source repo.
-
-### Deploy the website
-
-1. Run `mike deploy --update-aliases {{ sedona_create_release.current_version 
}} latest -b website -p`. This will deploy this website to Sedona main repo's 
`website`.
-2. Check out the master branch.
-3. Git commit and push your changes in `download.md` and `index.md` to master 
branch. Delete all generated docs.
-4. Check out the `website` branch.
-5. In a separate folder, check out GitHub sedona-website [asf-site 
branch](https://github.com/apache/sedona-website/tree/asf-site)
-6. Copy all content to in Sedona main repo `website` branch to Sedona website 
repo `asf-site` branch.
-7. Commit and push the changes to the remote `asf-site` branch.
+1. Check out the {{ sedona_create_release.current_version }} Git tag on your 
local repo to a branch namely `branch-{{ sedona_create_release.current_version 
}}`
+2. Add the download link to [Download page](../download.md).
+3. Add the news to `docs/index.md`.
+4. Push the changes to this branch on GitHub.
+5. GitHub CI will pick up the changes and deploy to `website` branch.
+6. Once the deployment is done, check out the `website` branch. In [this 
file](https://github.com/apache/sedona/blob/website/versions.json), put 
`latest` to the `aliases` of the version to release.
+7. Normally [this repo](https://github.com/jiayuasu/sedona-sync-action) will 
automatically publish the website on a daily basis.

Reply via email to