Skip to content

Commit dc09ba5

Browse files
committed
Add step to publish documentation to Cloudflare
1 parent b7f290e commit dc09ba5

File tree

3 files changed

+27
-13
lines changed

3 files changed

+27
-13
lines changed

.github/workflows/test-3.11-stable.yml

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
- name: Stop broker
3535
run: docker stop rabbitmq && docker rm rabbitmq
3636
- name: Publish snapshot
37-
run: ./mvnw clean deploy -Psnapshots -DskipITs -DskipTests
37+
run: ./mvnw clean deploy -Psnapshots -DskipITs -DskipTests --no-transfer-progress
3838
env:
3939
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
4040
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
@@ -84,8 +84,30 @@ jobs:
8484
client-payload: >-
8585
{"archive_url" : "https://github.com/rabbitmq/rabbitmq-java-tools-binaries-dev/releases/download/${{ env.tag_name }}/perf-test-${{ env.release_version}}.jar",
8686
"tags": "pivotalrabbitmq/perf-test:dev,pivotalrabbitmq/perf-test:dev-${{ env.tag_name }}"}
87-
- name: Publish Documentation
87+
- name: Generate documentation
88+
run: |
89+
rm -rf target/generated-docs
90+
make doc
91+
mkdir documentation-output
92+
cp target/generated-docs/index.html documentation-output
93+
- name: Publish documentation to GitHub Pages
8894
run: |
8995
git config user.name "rabbitmq-ci"
9096
git config user.email "[email protected]"
91-
ci/publish-documentation-to-github-pages.sh
97+
ci/publish-documentation-to-github-pages.sh
98+
- name: Generate worker configuration file
99+
run: |
100+
tee wrangler.toml <<EOF
101+
name = "$SITE_NAME"
102+
type = "webpack"
103+
workers_dev = true
104+
routes = ["https://perftest-dev.rabbitmq.com/*"]
105+
compatibility_date = "2021-12-06"
106+
107+
[site]
108+
bucket = "./documentation-output"
109+
EOF
110+
- name: Publish documentation to Cloudflare
111+
uses: cloudflare/[email protected]
112+
with:
113+
apiToken: ${{ secrets.CF_API_TOKEN }}

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,4 +104,4 @@ signed-binary: clean ## Build a GPG signed binary
104104

105105
.PHONY: doc
106106
doc: ## Generate PerfTest documentation
107-
@mvnw asciidoctor:process-asciidoc
107+
@mvnw asciidoctor:process-asciidoc --no-transfer-progress

ci/publish-documentation-to-github-pages.sh

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,12 @@
22

33
MESSAGE=$(git log -1 --pretty=%B)
44

5-
rm -rf target/generated-docs
6-
7-
make doc
8-
9-
cp target/generated-docs/index.html $RESOURCES_DIR/web-output
10-
11-
git checkout -- .mvn
12-
135
# Concourse does shallow clones, so need the next 2 commands to have the gh-pages branch
146
git remote set-branches origin 'gh-pages'
157
git fetch -v
168
git checkout gh-pages
179
mkdir -p snapshot/htmlsingle
18-
cp target/generated-docs/index.html snapshot/htmlsingle
10+
cp documentation-output/index.html snapshot/htmlsingle
1911
if [ -z "$(git status --porcelain)" ];
2012
then
2113
echo "Nothing to commit"

0 commit comments

Comments
 (0)