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

rzo1 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/storm-site.git

commit a21b07d045e807fa11807adf70d011af316240e9
Author: Richard Zowalla <[email protected]>
AuthorDate: Fri May 2 20:55:40 2025 +0200

    Add the possibility to build the website manually using docker without the 
need of manually installing ruby and dependencies. Updates README accordingly.
---
 .github/workflows/publish-staging.yml |  2 +-
 .github/workflows/publish.yml         |  2 +-
 README.md                             | 40 +++++++++++++++++++++++++++++------
 _config-local.yml                     | 27 +++++++++++++++++++++++
 docker-compose.yml                    | 20 ++++++++++++++++++
 5 files changed, 83 insertions(+), 8 deletions(-)

diff --git a/.github/workflows/publish-staging.yml 
b/.github/workflows/publish-staging.yml
index 7f36c232ec..3a5a7af873 100644
--- a/.github/workflows/publish-staging.yml
+++ b/.github/workflows/publish-staging.yml
@@ -47,7 +47,7 @@ jobs:
 
       - name: 'Copy build to site repo'
         run: |
-          rsync -avP --delete --exclude .git --exclude README.md --exclude 
.asf.yaml _site/. ./asf-staging
+          rsync -avP --delete --exclude .git --exclude docker-compose.yml 
--exclude README.md --exclude .asf.yaml _site/. ./asf-staging
         shell: bash
 
       - name: 'commit site'
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index 911eb140a6..9fae4d3286 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -51,7 +51,7 @@ jobs:
 
       - name: 'Copy build to site repo'
         run: |
-          rsync -avP --delete --exclude .git --exclude README.md --exclude 
.asf.yaml _site/. ./asf-site
+          rsync -avP --delete --exclude .git --exclude docker-compose.yml 
--exclude README.md --exclude .asf.yaml _site/. ./asf-site
         shell: bash
 
       - name: 'commit site'
diff --git a/README.md b/README.md
index d3dbcc9898..b326348b87 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,21 @@
 # Apache Storm Website and Documentation
 This is the source for the Release specific part of the Apache Storm website 
and documentation. It is statically generated using 
[jekyll](https://jekyllrb.com).
 
-## Site Generation
+
+# How to build?
+
+This website is build using Jekyll. Make sure to have it available locally.
+To build and run server locally type 'jekyll serve'. The site can then be 
accessed at localhost:4000.
+
+## Docker
+
+You can build the website for local testing by running
+
+```bash
+docker compose up local
+```
+
+## Without Docker
 First install jekyll and bundler (assuming you have ruby installed):
 
 ```
@@ -24,7 +38,7 @@ Point your browser to https://localhost:4000
 
 By default, jekyll will generate the site in a `_site` directory.
 
-## Adding a new release to the website
+# Adding a new release to the website
 In order to add a new release, you must have committer access to the 
storm-site repository at https://github.com/apache/storm-site.
 
 You must first generate Javadoc for the new release. Check out the Storm 
repository from https://github.com/apache/storm, and check out the version of 
the code you are releasing.
@@ -61,10 +75,6 @@ Compose a new blog post announcement for the new release on 
the `_posts` folder.
 
 Update the downloads page on `downloads.html` to point to the new version's 
links. 
 
-##  Build with GitHub actions
-
-The website is automatically build on a push to main and any changes are 
pushed to the asf-site branch. A preview is available via 
https://storm.staged.apache.org/ if you go to the GitHub Actions tab and 
trigger a manual staging deploy action.
-
 ## How release specific docs work
 
 Release specific documentation is controlled by a jekyll plugin 
[releases.rb](./_plugins/releases.rb).
@@ -110,3 +120,21 @@ If you want to refer to a javadoc for the current release 
use a relative path.
 ```
 [TopologyBuilder](javadocs/org/apache/storm/topology/TopologyBuilder.html)
 ```
+
+# Deployment
+
+This website uses the typical ASF layout. The actual website is found on the 
branch `asf-site`, any changes need to be pushed there.
+
+You can run
+
+```bash
+docker compose up build
+```
+
+which will create a folder `_site`. This is the content, which needs to be 
copied after wards to the `asf-site` branch.
+If you wish to see a preview for your branch, you can use `asf-staging` to see 
a copy hosted under: https://storm.staged.apache.org/
+
+### Build with GitHub actions
+
+The website is automatically build on a push to `main` and any changes are 
pushed to the `asf-site` branch.
+A preview is available via https://storm.staged.apache.org/ if you go to the 
GitHub Actions tab and trigger a manual staging deploy action.
diff --git a/_config-local.yml b/_config-local.yml
new file mode 100644
index 0000000000..53dcc073f0
--- /dev/null
+++ b/_config-local.yml
@@ -0,0 +1,27 @@
+# Welcome to Jekyll!
+#
+# This config file is meant for settings that affect your whole blog, values
+# which you are expected to set up once and rarely need to edit after that.
+# For technical reasons, this file is *NOT* reloaded automatically when you use
+# 'jekyll serve'. If you change this file, please restart the server process.
+
+# Site settings
+# Site settings
+title: Apache Storm
+baseurl: "" # the subpath of your site, e.g. /blog/
+url: "http://localhost:4000"; # the base hostname & protocol for your site
+github_username: apache/storm
+
+# Build settings
+markdown: redcarpet
+redcarpet:
+  extensions: ["no_intra_emphasis", "fenced_code_blocks", "autolink", 
"tables", "with_toc_data"]
+
+keep_files:   [".git", ".svn"]
+encoding:     "utf-8"
+exclude:
+  - README.md
+  - vendor/
+
+
+
diff --git a/docker-compose.yml b/docker-compose.yml
new file mode 100644
index 0000000000..f7127a5a5b
--- /dev/null
+++ b/docker-compose.yml
@@ -0,0 +1,20 @@
+services:
+  local:
+    image: jekyll/jekyll:latest
+    profiles: ["local"]
+    volumes:
+      - .:/srv/jekyll
+    ports:
+      - "4000:4000"
+    command: jekyll serve --watch --force_polling -config _config-local.yml
+
+  build:
+    image: jekyll/jekyll:latest
+    profiles: ["build"]
+    volumes:
+      - .:/srv/jekyll
+    command: jekyll build
+
+volumes:
+  jekyll_data:
+    driver: local
\ No newline at end of file

Reply via email to