File tree Expand file tree Collapse file tree 2 files changed +24
-7
lines changed
Expand file tree Collapse file tree 2 files changed +24
-7
lines changed Original file line number Diff line number Diff line change 55 branches :
66 - dev
77 - main
8+ tags :
9+ - ' v*'
810 workflow_dispatch :
911
1012concurrency :
@@ -113,13 +115,18 @@ jobs:
113115
114116 - name : Set environment variables
115117 run : |
116- SANITIZED_REF=$(echo "${GITHUB_REF##*/}" | tr '/' '-')
117- echo "SANITIZED_REF=$SANITIZED_REF" >> $GITHUB_ENV
118- echo "INGRESS=$([ "$SANITIZED_REF" == "main" ] && echo "docs.torus.network" || echo "$SANITIZED_REF.docs.torus.network")" >> $GITHUB_ENV
118+ echo "SANITIZED_REF=$(echo "${GITHUB_REF##*/}" | tr '/' '-')" >> $GITHUB_ENV
119+
120+ - name : Deploy application (Branch)
121+ if : github.ref_type == 'branch'
122+ run : |
123+ helmfile sync -e ${{ github.ref_name == 'main' && 'prod' || 'dev' }} \
124+ --set deployment.image.tag=${{ steps.commit.outputs.short }}
119125
120- - name : Deploy application
126+ - name : Deploy application (Tag)
127+ if : github.ref_type == 'tag'
121128 run : |
122129 helmfile sync \
123- --state-values-set releaseName=${{ env.SANITIZED_REF }}-torus-docs \
124- --state-values-set ingressHost=${{ env.INGRESS }} \
125- --set deployment.image.tag=${{ steps.commit.outputs.short }}
130+ --state-values-set releaseName=" ${{ env.SANITIZED_REF }}-torus-docs" \
131+ --state-values-set ingressHost=" ${{ env.SANITIZED_REF }}.docs.torus.network" \
132+ --set deployment.image.tag=${{ steps.commit.outputs.short }}
Original file line number Diff line number Diff line change @@ -2,6 +2,16 @@ environments:
22 default :
33 values :
44 - helm/values.yaml
5+ dev :
6+ values :
7+ - helm/values.yaml
8+ - releaseName : dev-torus-docs
9+ - ingressHost : dev.docs.torus.network
10+ prod :
11+ values :
12+ - helm/values.yaml
13+ - releaseName : torus-docs
14+ - ingressHost : docs.torus.network
515---
616helmDefaults :
717 wait : true
You can’t perform that action at this time.
0 commit comments