Skip to content

Commit 099a3bf

Browse files
authored
Merge pull request #329 from Accenture/fix-restore-helm-index-yml
Fix restore helm index yml
2 parents 64d4076 + b071e2a commit 099a3bf

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

.travis.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ stages:
55
if: branch = master
66
- name: website
77
if: branch = master AND type != pull_request
8+
- name: restore-helm-repo-index
9+
if: branch = master AND type != pull_request
810
- name: sourcedocs
911
if: branch = master AND type != pull_request
1012

@@ -55,7 +57,20 @@ jobs:
5557
- git config --global user.email "${GH_EMAIL}"
5658
- echo "machine github.com login ${GH_NAME} password ${GH_TOKEN}" > ~/.netrc
5759
- cd website && yarn install && GIT_USER="${GH_NAME}" yarn run publish-gh-pages
58-
- git checkout gh-pages && git checkout $(git rev-list -n1 HEAD -- index.yaml)~1 -- index.yaml && git add index.yaml && git commit -m "Auto-restore Helm chart repo index after Docusaurus publish" && git push --verbose
60+
- stage: restore-helm-repo-index
61+
language: minimal
62+
script:
63+
- git config --global user.name "${GH_NAME}"
64+
- git config --global user.email "${GH_EMAIL}"
65+
- echo "machine github.com login ${GH_NAME} password ${GH_TOKEN}" > ~/.netrc
66+
- git fetch --unshallow
67+
- git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
68+
- git fetch origin
69+
- git checkout gh-pages
70+
- test -e index.yaml || git checkout $(git rev-list -n1 HEAD -- index.yaml)~1 -- index.yaml
71+
- git add index.yaml
72+
- git diff-index --quiet HEAD || git commit -m "Auto-restore Helm chart repo index after Docusaurus publish"
73+
- git push
5974
- stage: sourcedocs
6075
<<: *elixir-env
6176
script:

0 commit comments

Comments
 (0)