File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -119,11 +119,24 @@ jobs:
119119 else
120120 helm repo index branches/$SAFE --url "https://${{ github.repository_owner }}.github.io/${GITHUB_REPOSITORY#*/}/branches/${SAFE}"
121121 fi
122+ # --- Root index dual publish ---
123+ # Maintain a root-level index.yaml so standard repo URL works without branch path.
124+ # Copy new artifact to root and merge index preserving history.
125+ if ls *.tgz >/dev/null 2>&1; then
126+ echo "Moving packaged chart(s) to root for dual publish"
127+ cp dist/*.tgz .
128+ if [ -f index.yaml ]; then
129+ helm repo index . --url "https://${{ github.repository_owner }}.github.io/${GITHUB_REPOSITORY#*/}" --merge index.yaml
130+ else
131+ helm repo index . --url "https://${{ github.repository_owner }}.github.io/${GITHUB_REPOSITORY#*/}"
132+ fi
133+ git add *.tgz index.yaml
134+ fi
122135 git add branches/$SAFE
123136 if git diff --cached --quiet; then
124137 echo "No changes to commit for branch repository"
125138 else
126- git commit -m "chore(chart): publish reloader ${{ steps.newver.outputs.version }} for branch $SAFE"
139+ git commit -m "chore(chart): publish reloader ${{ steps.newver.outputs.version }} ( branch $SAFE + root index) "
127140 fi
128141 git push origin gh-pages
129142 # Clean working tree to avoid checkout conflicts
You can’t perform that action at this time.
0 commit comments