You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by vy...@apache.org on 2024/04/11 13:53:13 UTC

(logging-parent) 01/01: Add `deploy-site.yaml` workflow

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

vy pushed a commit to branch main-site-pro
in repository https://gitbox.apache.org/repos/asf/logging-parent.git

commit eb3d4c1d8e1149f7165147be2298586ab243a2ee
Author: Volkan Yazıcı <vo...@yazi.ci>
AuthorDate: Thu Apr 11 15:52:51 2024 +0200

    Add `deploy-site.yaml` workflow
---
 .github/workflows/deploy-site.yaml | 66 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 66 insertions(+)

diff --git a/.github/workflows/deploy-site.yaml b/.github/workflows/deploy-site.yaml
new file mode 100644
index 0000000..7679ddb
--- /dev/null
+++ b/.github/workflows/deploy-site.yaml
@@ -0,0 +1,66 @@
+#
+# 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: deploy-site
+
+on:
+  push:
+    branches:
+      - "main"
+      - "main-site-pro"
+    paths-ignore:
+      - "**.md"
+      - "**.txt"
+
+permissions: read-all
+
+jobs:
+
+  deploy-site-stg:
+    if: github.repository == 'apache/logging-parent' && github.ref_name == 'main'
+    uses: apache/logging-parent/.github/workflows/deploy-site-reusable.yaml@main
+    # Secrets for committing the generated site
+    secrets:
+      GPG_SECRET_KEY: ${{ secrets.LOGGING_GPG_SECRET_KEY }}
+    # Write permissions for committing the generated site
+    permissions:
+      contents: write
+    with:
+      asf-yaml-content: |
+        staging:
+          profile: ~
+          whoami: ${{ github.ref_name }}-site-stg-out
+          subdir: content/logging-parent
+      target-branch: ${{ github.ref_name }}-site-stg-out
+
+  deploy-site-pro:
+    if: github.repository == 'apache/logging-parent' && github.ref_name == 'main-site-pro'
+    uses: apache/logging-parent/.github/workflows/deploy-site-reusable.yaml@main
+    # Secrets for committing the generated site
+    secrets:
+      GPG_SECRET_KEY: ${{ secrets.LOGGING_GPG_SECRET_KEY }}
+    # Write permissions for committing the generated site
+    permissions:
+      contents: write
+    with:
+      asf-yaml-content: |
+        publish:
+          profile: ~
+          whoami: ${{ github.ref_name }}-out
+          subdir: content/logging-parent
+      source-branch: ${{ github.ref_name }}
+      target-branch: ${{ github.ref_name }}-out