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

wave pushed a commit to branch preview/pelican-gha
in repository https://gitbox.apache.org/repos/asf/petri.git

commit 68dd99e03676d86fc00826cb821ebea996e94cae
Author: Dave Fisher <dave2w...@comcast.net>
AuthorDate: Mon Jun 10 17:24:45 2024 -0500

    Output Branch Automation
---
 .github/workflows/build-pelican.yml | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/build-pelican.yml 
b/.github/workflows/build-pelican.yml
index e80dd43..05bf110 100644
--- a/.github/workflows/build-pelican.yml
+++ b/.github/workflows/build-pelican.yml
@@ -33,7 +33,12 @@ jobs:
       - name: Branch
         run: |
           echo "Branch: ${{ env.BRANCH_NAME }}"
+          if [ "${{ env.BRANCH_NAME }}" == "${{ 
github.event.repository.default_branch }}" ]; then
+            echo "OUTPUT_BRANCH=asf-site" >> $GITHUB_ENV
+          else
+            echo "OUTPUT_BRANCH=$${{ env.BRANCH_NAME }}-staging" >> $GITHUB_ENV
+          fi
       - name: Pelican  Build
         uses: apache/infrastructure-actions/pelican@main
         with:
-          destination: ${{ env.BRANCH_NAME }}-site
+          destination: ${{ env.OUTPUT_BRANCH }}

Reply via email to