Skip to content

Commit b180709

Browse files
committed
[SPARK-49495][DOCS] Document and Feature Preview on the master branch via Live GitHub Pages Updates
### What changes were proposed in this pull request? This pull request introduces functionalities that enable 'Document and Feature Preview on the master branch via Live GitHub Pages Updates'. ### Why are the changes needed? - Instead of limited 72-hour voting phases, it provides the developer community with more opportunities to preview and verify the documentation contents. - Instead of waiting for the final announcement of an official spark feature release, users can now preview some of the ongoing documented features, increasing the willingness to upgrade, sensing breaking changes in advance, and reducing the burden during the final upgrades. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? An [example](https://yaooqinn.github.io/spark-gh-pages/) has been established by this repo - https://github.com/yaooqinn/spark-gh-pages - Broken logo links are fixed at #47966 ### Was this patch authored or co-authored using generative AI tooling? no Closes #47968 from yaooqinn/SPARK-49495. Authored-by: Kent Yao <yao@apache.org> Signed-off-by: Kent Yao <yao@apache.org>
1 parent a7f191b commit b180709

1 file changed

Lines changed: 90 additions & 0 deletions

File tree

.github/workflows/pages.yml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one
3+
# or more contributor license agreements. See the NOTICE file
4+
# distributed with this work for additional information
5+
# regarding copyright ownership. The ASF licenses this file
6+
# to you under the Apache License, Version 2.0 (the
7+
# "License"); you may not use this file except in compliance
8+
# with the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing,
13+
# software distributed under the License is distributed on an
14+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
# KIND, either express or implied. See the License for the
16+
# specific language governing permissions and limitations
17+
# under the License.
18+
#
19+
20+
name: GitHub Pages deployment
21+
22+
on:
23+
push:
24+
branches:
25+
- master
26+
27+
concurrency:
28+
group: 'docs preview'
29+
cancel-in-progress: true
30+
31+
jobs:
32+
docs:
33+
name: Build and deploy documentation
34+
runs-on: ubuntu-latest
35+
permissions:
36+
id-token: write
37+
pages: write
38+
env:
39+
SPARK_TESTING: 1 # Reduce some noise in the logs
40+
RELEASE_VERSION: 'In-Progress'
41+
steps:
42+
- name: Checkout Spark repository
43+
uses: actions/checkout@v4
44+
with:
45+
repository: apache/spark
46+
ref: 'master'
47+
- name: Install Java 17
48+
uses: actions/setup-java@v4
49+
with:
50+
distribution: zulu
51+
java-version: 17
52+
- name: Install Python 3.9
53+
uses: actions/setup-python@v5
54+
with:
55+
python-version: '3.9'
56+
architecture: x64
57+
cache: 'pip'
58+
- name: Install Python dependencies
59+
run: pip install --upgrade -r dev/requirements.txt
60+
- name: Install Ruby for documentation generation
61+
uses: ruby/setup-ruby@v1
62+
with:
63+
ruby-version: '3.3'
64+
bundler-cache: true
65+
- name: Install Pandoc
66+
uses: pandoc/actions/setup@d6abb76f6c8a1a9a5e15a5190c96a02aabffd1ee
67+
with:
68+
version: 3.3
69+
- name: Install dependencies for documentation generation
70+
run: |
71+
cd docs
72+
gem install bundler -v 2.4.22 -n /usr/local/bin
73+
bundle install --retry=100
74+
- name: Run documentation build
75+
run: |
76+
sed -i".tmp1" 's/SPARK_VERSION:.*$/SPARK_VERSION: '"$RELEASE_VERSION"'/g' docs/_config.yml
77+
sed -i".tmp2" 's/SPARK_VERSION_SHORT:.*$/SPARK_VERSION_SHORT: '"$RELEASE_VERSION"'/g' docs/_config.yml
78+
sed -i".tmp3" "s/'facetFilters':.*$/'facetFilters': [\"version:$RELEASE_VERSION\"]/g" docs/_config.yml
79+
sed -i".tmp4" 's/__version__: str = .*$/__version__: str = "'"$RELEASE_VERSION"'"/' python/pyspark/version.py
80+
cd docs
81+
SKIP_RDOC=1 bundle exec jekyll build
82+
- name: Setup Pages
83+
uses: actions/configure-pages@v5
84+
- name: Upload artifact
85+
uses: actions/upload-pages-artifact@v3
86+
with:
87+
path: 'docs/_site'
88+
- name: Deploy to GitHub Pages
89+
id: deployment
90+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)