Adding the Narration Microservice #268
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
build_java17: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: temurin | |
java-version: 17 | |
- name: Microservices build with Maven | |
run: mvn -B install --file quarkus-workshop-super-heroes/pom.xml -Pcomplete | |
- name: Native build with Maven | |
run: mvn -B install --file quarkus-workshop-super-heroes/pom.xml -Pnative -Dquarkus.native.container-build=true -DskipITs | |
- name: Extension build with Maven | |
run: mvn -B install -f quarkus-workshop-super-heroes/super-heroes/extension-version/pom.xml | |
publication: | |
needs: [ build_java17 ] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: temurin | |
java-version: 17 | |
- name: Site generation | |
run: | | |
sudo apt-get install graphviz | |
export BASE_URL=`curl -Ls -o /dev/null -w %{url_effective} -I ${GITHUB_REPOSITORY_OWNER}.github.io` | |
cd quarkus-workshop-super-heroes/docs | |
mvn install | |
# make an index.html | |
cp target/generated-asciidoc/spine-azure.html target/generated-asciidoc/index-azure.html | |
# Move things around to preserve the super-heroes structure | |
mkdir -p target/site/super-heroes | |
cp -R target/generated-asciidoc/* target/site/super-heroes | |
# Move the redirect.html page to the root | |
cp target/generated-asciidoc/redirect.html target/site/index.html | |
- name: Store PR id | |
if: "github.event_name == 'pull_request'" | |
run: echo ${{ github.event.number }} > ./quarkus-workshop-super-heroes/docs/target/site/pr-id.txt | |
- name: Publishing directory for PR preview | |
if: "github.event_name == 'pull_request'" | |
uses: actions/upload-artifact@v2 | |
with: | |
name: site | |
path: ./quarkus-workshop-super-heroes/docs/target/site | |
retention-days: 3 | |
- name: Publication | |
if: "github.ref_name == 'main' && (github.event_name == 'push' || github.event_name == 'schedule')" | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./quarkus-workshop-super-heroes/docs/target/site |