Skip to content

Commit 2f3a9fc

Browse files
committed
Release snapshot docs after CI build
1 parent f3ed0e4 commit 2f3a9fc

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

.github/workflows/build.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,16 +130,20 @@ jobs:
130130
run: |
131131
make e2e-helm-test
132132
133-
- name: Deploy Snapshots
133+
- name: Deploy Snapshots & Docs
134134
if: ${{ github.ref == 'refs/heads/master' && success() }}
135135
env:
136136
MAVEN_SONATYPE_USERNAME: ${{ secrets.MAVEN_SONATYPE_USERNAME }}
137137
MAVEN_SONATYPE_TOKEN: ${{ secrets.MAVEN_SONATYPE_TOKEN }}
138138
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
139139
shell: bash
140140
run: |
141+
git config --local user.name "Github Action"
142+
git config --local user.email "[email protected]"
143+
export NO_DAEMON=false
141144
sh ./hack/maven-gpg.sh
142145
make mvn-deploy GPG_PASSPHRASE=${GPG_PASSPHRASE}
146+
make push-snapshot-docs
143147
144148
- name: Upload Manifests
145149
uses: actions/upload-artifact@v1

Makefile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2243,6 +2243,29 @@ else
22432243
endif
22442244

22452245

2246+
# ----------------------------------------------------------------------------------------------------------------------
2247+
# Release the Coherence Operator snapshot documentation.
2248+
# ----------------------------------------------------------------------------------------------------------------------
2249+
.PHONY: push-snapshot-docs
2250+
push-snapshot-docs: $(BUILD_TARGETS)/generate $(BUILD_TARGETS)/manifests docs
2251+
mkdir -p /tmp/coherence-operator || true
2252+
cp -R $(BUILD_OUTPUT) /tmp/coherence-operator
2253+
git stash save --keep-index --include-untracked || true
2254+
git stash drop || true
2255+
git checkout --track origin/gh-pages
2256+
git config pull.rebase true
2257+
git pull
2258+
rm -rf docs/snapshot
2259+
mv $(BUILD_OUTPUT)/docs/ docs/snapshot/
2260+
git add -A docs/*
2261+
git status
2262+
git clean -d -f
2263+
git status
2264+
git commit -m "Release Coherence Operator snapshot docs $(VERSION)"
2265+
git log -1
2266+
git push origin gh-pages
2267+
2268+
22462269
# ----------------------------------------------------------------------------------------------------------------------
22472270
# Release the Coherence Operator.
22482271
# ----------------------------------------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)