Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CI deploy docs #2522

Merged
merged 3 commits into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/push-deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Deploy Docs Smallrye Reactive Messaging

on:
workflow_dispatch:
inputs:
version:
description: 'Release version'

jobs:
deploy-docs:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
RELEASE_VERSION: ${{ github.event.inputs.version }}

steps:
- name: Git checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.RELEASE_TOKEN }}
- name: Java setup
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Install just
uses: taiki-e/install-action@just
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.9
cache: 'pipenv'
cache-dependency-path: documentation/Pipfile.lock
- name: Install pipenv
run: pip install pipenv
- name: Set Release Version
run: |
echo "RELEASE_VERSION=${RELEASE_VERSION:-"$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)"}" >> $GITHUB_ENV
- name: Perform the deploy docs
run: |
just build-ci deploy-docs
14 changes: 9 additions & 5 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ test:

# Build on CI without tests
build-ci:
./mvnw -B -ntp -s .build/ci-maven-settings.xml clean verify -DskipTests
./mvnw -B -ntp -s .build/ci-maven-settings.xml clean install -DskipTests

# Test on CI with tests
test-ci:
Expand Down Expand Up @@ -75,6 +75,7 @@ release: pre-release
jbang .build/CompatibilityUtils.java extract
@echo "Call JReleaser"
./mvnw -B -ntp jreleaser:full-release -Pjreleaser -pl :smallrye-reactive-messaging -s .build/ci-maven-settings.xml
-[[ ${DEPLOY_WEBSITE} == "true" ]] && just deploy-docs
@echo "Bump to 999-SNAPSHOT and push upstream"
./mvnw -B -ntp versions:set -DnewVersion=999-SNAPSHOT -DgenerateBackupPoms=false -s .build/ci-maven-settings.xml
git commit -am "[RELEASE] - Next development version: 999-SNAPSHOT"
Expand All @@ -89,7 +90,6 @@ deploy-to-maven-central: decrypt-secrets init-gpg
post-release:
@echo "🚀 Post-release steps..."
-[[ ${CLEAR_REVAPI} == "true" ]] && just clear-revapi
-[[ ${DEPLOY_WEBSITE} == "true" ]] && just deploy-docs

# Update Pulsar Connector Configuration Documentation
update-pulsar-config-docs:
Expand All @@ -98,9 +98,13 @@ update-pulsar-config-docs:

# Deploy documentation
deploy-docs:
@echo "📝 Deploying documentation to GitHub"
@if [[ -z "${RELEASE_VERSION}" ]]; then exit 1; fi
./mvnw -B -ntp clean compile -f documentation && cd documentation && pipenv install && pipenv run mike deploy --update-aliases --push --remote origin "${RELEASE_VERSION}" "latest"
#!/usr/bin/env bash
echo "📝 Deploying documentation to GitHub"
if [[ -z "${RELEASE_VERSION}" ]]; then exit 1; fi
./mvnw -B -ntp clean compile -pl documentation
cd documentation
pipenv install
pipenv run mike deploy --update-aliases --push --remote origin "${RELEASE_VERSION}" "latest"

# Clear RevAPI justifications
clear-revapi:
Expand Down
15 changes: 15 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -842,6 +842,21 @@
</properties>
<build>
<defaultGoal>clean install</defaultGoal>
<plugins>
<plugin>
<groupId>io.sundr</groupId>
<artifactId>sundr-maven-plugin</artifactId>
<version>${sundr-maven-plugin.version}</version>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, I'll need to try it

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works well to generate the bom and include to the project. But it has an incompatibility with mvnd, and I run mvnd -Dquickly locally :)

<executions>
<execution>
<goals>
<goal>generate-bom</goal>
</goals>
<phase>none</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
Expand Down
Loading