Skip to content

Commit

Permalink
Main branch will published to /staging/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
dmaier-redislabs authored Jan 10, 2024
1 parent 814ac31 commit 67efd2b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,17 @@ jobs:
&& ./google-cloud-sdk/bin/gcloud auth list
- name: Sync the branch to the bucket
run: |
if [[ "${{ github.ref_name }}" == "main" || "${{ github.ref_name }}" == "latest" ]]
if [[ "${{ github.ref_name }}" == "main" ]]
then
bucket_path=/staging/dev
elif [[ "${{ github.ref_name }}" == "latest" ]]
then
bucket_path=${{ github.ref_name }}
elif [[ "${{ endsWith(github.ref_name, '-build') }}" == "true" ]]
then
bucket_path=`echo ${{ github.ref_name }} | sed 's/-build$//'`
else
bucket_path="/staging/${{ github.ref_name }}"
bucket_path=/staging/${{ github.ref_name }}
fi \
&& ./google-cloud-sdk/bin/gsutil -m rsync -r -c -j html -d ${{ github.workspace }}/public gs://$BUCKET/$bucket_path
- name: End
Expand Down

0 comments on commit 67efd2b

Please sign in to comment.