diff --git a/.github/workflows/build-site.yml b/.github/workflows/build-site.yml new file mode 100644 index 0000000..cb9a0ce --- /dev/null +++ b/.github/workflows/build-site.yml @@ -0,0 +1,13 @@ +# This workflow takes the contents of the branches/tags and builds the production documentation site +name: Build production site + +on: + push: + branches: [master] + +jobs: + dispatch: + runs-on: ubuntu-latest + steps: + - name: Trigger build + run: curl -X POST -d {} https://api.netlify.com/build_hooks/6238ac2881e6d20c7db8e6c8 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cb18155..a26e0ad 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,10 +2,10 @@ name: build on: push: paths-ignore: - - 'doc/**' + - 'docs/**' pull_request: paths-ignore: - - 'doc/**' + - 'docs/**' jobs: build: diff --git a/.github/workflows/guide-website-update.yml b/.github/workflows/guide-website-update.yml deleted file mode 100644 index e443680..0000000 --- a/.github/workflows/guide-website-update.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Guide Web Site Deploy - -on: - push: - branches: master - paths: - - 'doc/**' - -jobs: - antora: - runs-on: ubuntu-18.04 - steps: - - uses: actions/checkout@v2.3.4 - with: - repository: hazelcast-guides/guides-site - ref: master - token: ${{ secrets.SECRET_TOKEN }} - - - name: Install Antora - run: | - sudo apt -y install curl dirmngr apt-transport-https lsb-release ca-certificates - curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - - sudo apt -y install nodejs - sudo npm i -g @antora/cli@2.3 @antora/site-generator-default@2.3 - - name: Build website artifacts - run: | - sh create.sh - - name: Commit artifacts changes - run: | - git config --global user.name 'devOpsHazelcast' - git config --global user.email 'devops@hazelcast.com' - export GUIDE_REPO=$(cut -d/ -f2 <<<"${GITHUB_REPOSITORY}") - export COMMIT_ID=$(git rev-parse --short "$GITHUB_SHA") - git add docs - git commit -m "${GUIDE_REPO}-${COMMIT_ID} guide update" - - name: Push artifacts to guides-site repo - run: git push diff --git a/README.adoc b/README.adoc new file mode 100644 index 0000000..10322d7 --- /dev/null +++ b/README.adoc @@ -0,0 +1 @@ +See the link:https://docs.hazelcast.com/tutorials/caching-springboot[tutorial]. \ No newline at end of file diff --git a/README.md b/README.md deleted file mode 100644 index fd04a9a..0000000 --- a/README.md +++ /dev/null @@ -1 +0,0 @@ -See the guide [here](https://guides.hazelcast.org/caching-springboot). diff --git a/create.sh b/create.sh index 5b04e46..0a9c146 100644 --- a/create.sh +++ b/create.sh @@ -1,2 +1,2 @@ -asciidoctor -a allow-uri-read *.adoc; -asciidoctor-pdf -a allow-uri-read *.adoc; \ No newline at end of file +asciidoctor -D . -a allow-uri-read docs/modules/ROOT/pages/*.adoc; +asciidoctor-pdf -D . -a allow-uri-read docs/modules/ROOT/pages/*.adoc; diff --git a/doc/antora.yml b/doc/antora.yml deleted file mode 100644 index 1d6852d..0000000 --- a/doc/antora.yml +++ /dev/null @@ -1,3 +0,0 @@ -name: caching-springboot -title: Caching with Spring Boot and Hazelcast -version: master diff --git a/docs/antora.yml b/docs/antora.yml new file mode 100644 index 0000000..2b5b7d4 --- /dev/null +++ b/docs/antora.yml @@ -0,0 +1,2 @@ +name: tutorials +version: ~ diff --git a/doc/modules/ROOT/pages/index.adoc b/docs/modules/ROOT/pages/caching-springboot.adoc similarity index 86% rename from doc/modules/ROOT/pages/index.adoc rename to docs/modules/ROOT/pages/caching-springboot.adoc index e65953e..1222a14 100644 --- a/doc/modules/ROOT/pages/index.adoc +++ b/docs/modules/ROOT/pages/caching-springboot.adoc @@ -1,20 +1,20 @@ -:github-address: https://github.com/hazelcast-guides/caching-springboot -:hazelcast: Hazelcast IMDG += Cache with Spring Boot and Hazelcast :templates-url: templates:ROOT:page$/ +:page-layout: tutorial +:page-product: imdg +:page-categories: Caching, Spring Boot +:page-lang: java +:page-edition: +:page-est-time: 5 mins :framework: Spring Boot -= Caching with Spring Boot and Hazelcast - -This guide will get you started to use Hazelcast as a cache manager for your Spring Boot application. - -include::{templates-url}/link-to-repo.adoc[] +:description: In this tutorial, you'll deploy a Spring Boot application that uses Hazelcast as a cache manager. == What You’ll Learn -In this guide, you'll deploy a Spring Boot application that uses Hazelcast as a cache manager. +{description} -== Prerequisites +== Before you Begin -- ~5 minutes - JDK 1.8+ - Apache Maven 3.2+ @@ -77,7 +77,7 @@ If we started the application, then every call to the endpoint `/books/` w Only if it does not find value in the cache, the method `findBookInSlowSource()` would be executed. -== Using Hazelcast as Cache Manager +== Use Hazelcast as Cache Manager We want to use Hazelcast as the cache manager. The good news is that all you have to do it to add Hazelcast to your classpath. @@ -109,7 +109,7 @@ hazelcast: No more configuration needed, Hazelcast is already used as the cache manager for your project! -== Starting the Application +== Start the Application To start the application, run the following command: @@ -125,7 +125,7 @@ Members {size:1, ver:1} [ ] ---- -== Testing the Application +== Test the Application You can test the application by executing the following command: @@ -141,8 +141,8 @@ curl localhost:8080/books/12345 Sample Book Name ---- -== What's more? +== See Also -If you want to use Hazelcast in the client-server topology, then it's enough to place `hazelcast-client.yaml` file instead of `hazelcast.yaml` on your classpath. And that's it! You configured a Hazelcast client. +If you want to use Hazelcast in the client/server topology, then it's enough to place `hazelcast-client.yaml` file instead of `hazelcast.yaml` on your classpath. And that's it! You configured a Hazelcast client. If you want to read more, check out the official documentation https://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-features.html#boot-features-hazelcast[Spring Boot: Hazelcast].