From 882ffa074400c849dcddcd257cf28f9343d28c2b Mon Sep 17 00:00:00 2001 From: Kent Yao Date: Tue, 3 Sep 2024 14:17:10 +0800 Subject: [PATCH 1/7] [SPARK-49495][SQL] Document and Feature Preview on master branch via Live GitHub Pages Updates --- .github/workflows/pages.yml | 90 +++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 .github/workflows/pages.yml diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml new file mode 100644 index 000000000000..8ab8dbe74d79 --- /dev/null +++ b/.github/workflows/pages.yml @@ -0,0 +1,90 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +name: GitHub pages deployment + +on: + push: + branches: + - master + pull_request_target: + branches: + - master + + +concurrency: + group: 'docs preview' + cancel-in-progress: true + +jobs: + docs: + name: Build and deploy documentation + runs-on: ubuntu-latest + permissions: + id-token: write + pages: write + env: + SPARK_TESTING: 1 # Reduce some noise in the logs + steps: + - name: Checkout Spark repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + repository: apache/spark + ref: 'master' + - name: Install Java 17 + uses: actions/setup-java@v4 + with: + distribution: zulu + java-version: 17 + - name: Install Python 3.9 + uses: actions/setup-python@v5 + with: + python-version: '3.9' + architecture: x64 + cache: 'pip' + - name: Install Python dependencies + run: pip install --upgrade -r dev/requirements.txt + - name: Install Ruby for documentation generation + uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.3' + bundler-cache: true + - name: Install Pandoc + uses: pandoc/actions/setup@d6abb76f6c8a1a9a5e15a5190c96a02aabffd1ee + with: + version: 3.0 + - name: Install dependencies for documentation generation + run: | + cd docs + gem install bundler -v 2.4.22 -n /usr/local/bin + bundle install --retry=100 + - name: Run documentation build + run: | + cd docs + SKIP_RDOC=1 bundle exec jekyll build + - name: Setup Pages + uses: actions/configure-pages@v5 + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: 'docs/_site' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 From 07639fb41a582ffcb7ddf12cd4c19e7ecc2fde41 Mon Sep 17 00:00:00 2001 From: Kent Yao Date: Tue, 3 Sep 2024 14:49:28 +0800 Subject: [PATCH 2/7] [SPARK-49495][SQL] Document and Feature Preview on master branch via Live GitHub Pages Updates --- .github/workflows/pages.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 8ab8dbe74d79..c521e06aeef4 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -23,9 +23,6 @@ on: push: branches: - master - pull_request_target: - branches: - - master concurrency: From b920d318b1770014ecdb6c68e022ca8a03d8c68d Mon Sep 17 00:00:00 2001 From: Kent Yao Date: Tue, 3 Sep 2024 17:32:39 +0800 Subject: [PATCH 3/7] [SPARK-49495][SQL] Document and Feature Preview on master branch via Live GitHub Pages Updates --- .github/workflows/pages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index c521e06aeef4..68d2d7cd3e5d 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -66,7 +66,7 @@ jobs: - name: Install Pandoc uses: pandoc/actions/setup@d6abb76f6c8a1a9a5e15a5190c96a02aabffd1ee with: - version: 3.0 + version: 3.3 - name: Install dependencies for documentation generation run: | cd docs From af0f64ceec326dc98cbee18614a6e31207a3f735 Mon Sep 17 00:00:00 2001 From: Kent Yao Date: Tue, 3 Sep 2024 19:51:37 +0800 Subject: [PATCH 4/7] [SPARK-49495][SQL] Document and Feature Preview on master branch via Live GitHub Pages Updates --- .github/workflows/pages.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 68d2d7cd3e5d..63dc08e30dd5 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -38,6 +38,7 @@ jobs: pages: write env: SPARK_TESTING: 1 # Reduce some noise in the logs + RELEASE_VERSION: 'In-Progress' steps: - name: Checkout Spark repository uses: actions/checkout@v4 @@ -74,6 +75,10 @@ jobs: bundle install --retry=100 - name: Run documentation build run: | + sed -i".tmp1" 's/SPARK_VERSION:.*$/SPARK_VERSION: '"$RELEASE_VERSION"'/g' docs/_config.yml + sed -i".tmp2" 's/SPARK_VERSION_SHORT:.*$/SPARK_VERSION_SHORT: '"$RELEASE_VERSION"'/g' docs/_config.yml + sed -i".tmp3" "s/'facetFilters':.*$/'facetFilters': [\"version:$RELEASE_VERSION\"]/g" docs/_config.yml + sed -i".tmp4" 's/__version__: str = .*$/__version__: str = "'"$RELEASE_VERSION"'"/' python/pyspark/version.py cd docs SKIP_RDOC=1 bundle exec jekyll build - name: Setup Pages From b656e3d877ffe794188c8a34484336da9461d67c Mon Sep 17 00:00:00 2001 From: Kent Yao Date: Thu, 12 Sep 2024 10:00:16 +0800 Subject: [PATCH 5/7] Update .github/workflows/pages.yml Co-authored-by: Hyukjin Kwon --- .github/workflows/pages.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 63dc08e30dd5..a62633f5212e 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -24,7 +24,6 @@ on: branches: - master - concurrency: group: 'docs preview' cancel-in-progress: true From 1e1e919b15c3bcfbc02d7ced032f76353cd2274c Mon Sep 17 00:00:00 2001 From: Kent Yao Date: Thu, 12 Sep 2024 10:00:28 +0800 Subject: [PATCH 6/7] Update .github/workflows/pages.yml Co-authored-by: Hyukjin Kwon --- .github/workflows/pages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index a62633f5212e..8ffcd0e20309 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -17,7 +17,7 @@ # under the License. # -name: GitHub pages deployment +name: GitHub Pages deployment on: push: From 305ac6e2462386e9a54e2bd8704bba335f6143c1 Mon Sep 17 00:00:00 2001 From: Kent Yao Date: Thu, 12 Sep 2024 10:04:11 +0800 Subject: [PATCH 7/7] Update .github/workflows/pages.yml --- .github/workflows/pages.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 8ffcd0e20309..083620427c01 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -42,7 +42,6 @@ jobs: - name: Checkout Spark repository uses: actions/checkout@v4 with: - fetch-depth: 0 repository: apache/spark ref: 'master' - name: Install Java 17