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 e198c4fe5c745483fd4902abeaed3a3ddd62db27
Author: Richard Zowalla <[email protected]>
AuthorDate: Fri May 2 20:17:40 2025 +0200

    Add GitHub action for site publish
---
 .github/workflows/publish.yml | 65 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 65 insertions(+)

diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
new file mode 100644
index 0000000000..911eb140a6
--- /dev/null
+++ b/.github/workflows/publish.yml
@@ -0,0 +1,65 @@
+# 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: Publish website
+
+on:
+  # Runs on pushes targeting the default branch
+  push:
+    branches: [ "main" ]
+
+  # Allows you to run this workflow manually from the Actions tab
+  workflow_dispatch:
+
+jobs:
+  build:
+    runs-on: ubuntu-latest
+
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v3
+      - name: Setup Ruby
+        uses: ruby/setup-ruby@v1
+        with:
+          ruby-version: '3.1' # Not needed with a .ruby-version file
+          bundler-cache: true # runs 'bundle install' and caches installed 
gems automatically
+          cache-version: 0 # Increment this number if you need to re-download 
cached gems
+      - name: Build with Jekyll
+        # Outputs to the './_site' directory by default
+        run: bundle exec jekyll build
+        env:
+          JEKYLL_ENV: production
+      - name: 'Checkout asf-site'
+        uses: actions/checkout@v4
+        with:
+          repository: 'apache/storm-site'
+          ref: 'asf-site'
+          path: 'asf-site'
+
+      - name: 'Copy build to site repo'
+        run: |
+          rsync -avP --delete --exclude .git --exclude README.md --exclude 
.asf.yaml _site/. ./asf-site
+        shell: bash
+
+      - name: 'commit site'
+        working-directory: ./asf-site
+        run: |
+          git config user.name "GitHub Actions Bot"
+          git config user.email "<>"
+          git add .
+          git commit -m "publishing $(date -Is)" 
+          git push
+        shell: bash
\ No newline at end of file

Reply via email to