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

POC for pushing site content to a git repo #47

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
9 changes: 8 additions & 1 deletion jetty-website.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ function set_global_variables() {
BUILT_SITE_DIR=$(pwd)/target/site;
UI_BUNDLE_FILE="$(pwd)/ui/build/ui-bundle.zip"
LOG_FILE="$SCRIPT_OUTPUT_DIR/jetty-website.log";

url="https://olamy.github.io/jetty.website/"
}

function print_settings() {
Expand Down Expand Up @@ -195,6 +197,11 @@ function deploy_site() {
exit 1;
fi

if [[ $deploy_dir == "mvn" ]]; then
./mvnw -B -e -V scm-publish:publish-scm
exit 0;
fi

if [[ ! -d "$deploy_dir" ]]; then
echo " - creating deployment directory"
mkdir -p $deploy_dir;
Expand Down Expand Up @@ -224,7 +231,7 @@ function main() {
set_environment;
#build_ui;
build_site;
deploy_site "$STAGE_DIR";
deploy_site "mvn"; # "$STAGE_DIR";
exit 0;
fi

Expand Down
19 changes: 19 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@
<name>Webtide</name>
<url>https://webtide.com</url>
</organization>
<distributionManagement>
<site>
<id>github</id>
<url>scm:git:[email protected]:olamy/jetty.website.git</url>
</site>
</distributionManagement>
<licenses>
<license>
<name>Eclipse Public License - Version 2.0</name>
Expand All @@ -28,6 +34,19 @@
<node.version>18.20.1</node.version>
</properties>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-scm-publish-plugin</artifactId>
<version>3.2.1</version>
<configuration>
<scmBranch>gh-pages</scmBranch>
<content>${project.build.directory}/site</content>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.antora</groupId>
Expand Down