Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .dev/build-docs.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ docker run \
--mount type=bind,source="$PWD",target="/spark-website" \
-w /spark-website \
docs-builder:latest \
/bin/bash -c "sh .dev/run-in-container.sh"
/bin/bash -c ".dev/run-in-container.sh"
13 changes: 7 additions & 6 deletions .dev/run-in-container.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,21 @@
#

# 1.Set env variable.
export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-arm64
export PATH=$JAVA_HOME/bin:$PATH
export JAVA_HOME="/usr/lib/jvm/$(ls /usr/lib/jvm/ | grep java-17-openjdk | awk '{print $NF}')"
export PATH="$JAVA_HOME/bin:$PATH"

# 2.Install bundler.
gem install bundler -v 2.4.22
bundle install

# 3. Create a user matching the host UID/GID
groupadd -g $HOST_GID docuser
useradd -u $HOST_UID -g $HOST_GID -m docuser
# 3. Create a user matching the host UID/GID, if it doesn't exist
groupadd -g $HOST_GID docuser || true
useradd -u $HOST_UID -g $HOST_GID -m docuser || true
DOC_USER=$(getent passwd "$HOST_UID" | cut -d: -f1)

# We need this link to make sure `python3` points to `python3.11` which contains the prerequisite packages.
ln -s "$(which python3.11)" "/usr/local/bin/python3"

# Build docs
rm -rf .jekyll-cache
su docuser -c "bundle exec jekyll build"
su "$DOC_USER" -c "bundle exec jekyll build"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ docker build \
Once the image is built, navigate to the `spark-website` root directory, run the script which processes
the Markdown files in the Docker container.
```
SPARK_WEBSITE_PATH="/path/to/spark-website" sh .dev/build-docs.sh
.dev/build-docs.sh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this lead to a html file change?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's README.md, html does not have a counterpart

```

## Docs sub-dir
Expand Down