Skip to content

Commit

Permalink
Publish docs zip
Browse files Browse the repository at this point in the history
  • Loading branch information
vietj committed Sep 16, 2024
1 parent 63b2701 commit 5122c06
Show file tree
Hide file tree
Showing 7 changed files with 242 additions and 21 deletions.
63 changes: 63 additions & 0 deletions .github/maven-cd-settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<!--
~ Copyright (c) 2021 Red Hat, Inc.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->

<settings>

<interactiveMode>false</interactiveMode>

<servers>
<server>
<id>vertx-snapshots-repository</id>
<username>${env.VERTX_NEXUS_USERNAME}</username>
<password>${env.VERTX_NEXUS_PASSWORD}</password>
</server>
</servers>

<profiles>
<profile>
<id>google-mirror</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>google-maven-central</id>
<name>GCS Maven Central mirror EU</name>
<url>https://maven-central.storage-download.googleapis.com/maven2/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>google-maven-central</id>
<name>GCS Maven Central mirror</name>
<url>https://maven-central.storage-download.googleapis.com/maven2/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
</settings>
55 changes: 55 additions & 0 deletions .github/maven-ci-settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<!--
~ Copyright (c) 2021 Red Hat, Inc.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->

<settings>

<interactiveMode>false</interactiveMode>

<profiles>
<profile>
<id>google-mirror</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>google-maven-central</id>
<name>GCS Maven Central mirror EU</name>
<url>https://maven-central.storage-download.googleapis.com/maven2/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>google-maven-central</id>
<name>GCS Maven Central mirror</name>
<url>https://maven-central.storage-download.googleapis.com/maven2/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
</settings>
39 changes: 39 additions & 0 deletions .github/workflows/ci-5.x.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: advanced-vertx-guide (5.x)
on:
push:
branches:
- master
pull_request:
branches:
- master
schedule:
- cron: '0 5 * * *'
jobs:
CI:
strategy:
matrix:
include:
- os: ubuntu-latest
jdk: 11
uses: ./.github/workflows/ci.yml
with:
branch: ${{ github.event.pull_request.head.sha || github.ref_name }}
jdk: ${{ matrix.jdk }}
os: ${{ matrix.os }}
secrets: inherit
Deploy:
if: ${{ github.repository_owner == 'vert-x3' && (github.event_name == 'push' || github.event_name == 'schedule') }}
needs: CI
uses: ./.github/workflows/deploy.yml
with:
branch: ${{ github.event.pull_request.head.sha || github.ref_name }}
jdk: 11
secrets: inherit
Publish:
if: ${{ github.repository_owner == 'vert-x3' && (github.event_name == 'push' || github.event_name == 'schedule') }}
needs: CI
uses: ./.github/workflows/publish.yml
with:
branch: ${{ github.event.pull_request.head.sha || github.ref_name }}
jdk: 11
secrets: inherit
39 changes: 19 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,29 @@
name: asciidoc
name: CI
on:
push:
branches:
- master
workflow_call:
inputs:
branch:
required: true
type: string
jdk:
default: 8
type: string
os:
default: ubuntu-latest
type: string
jobs:
Test:
name: Deploy docs zip
strategy:
matrix:
os: [ubuntu-latest]
jdk: [11]
runs-on: ${{ matrix.os }}
name: Run tests
runs-on: ${{ inputs.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ inputs.branch }}
- name: Install JDK
uses: actions/setup-java@v2
with:
java-version: 11
java-version: ${{ inputs.jdk }}
distribution: temurin
- name: Render guide
run: mvn compile asciidoctor:process-asciidoc
- name: Publish to GitHub Pages
uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
BRANCH: gh-pages
FOLDER: target/docs/advanced-vertx-guide
CLEAN: true
- name: Run tests
run: mvn -s .github/maven-ci-settings.xml -q clean verify -B
32 changes: 32 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Deploy
on:
workflow_call:
inputs:
branch:
required: true
type: string
jdk:
default: 8
type: string
jobs:
Deploy:
name: Deploy to OSSRH
runs-on: ubuntu-latest
env:
VERTX_NEXUS_USERNAME: ${{ secrets.VERTX_NEXUS_USERNAME }}
VERTX_NEXUS_PASSWORD: ${{ secrets.VERTX_NEXUS_PASSWORD }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ inputs.branch }}
- name: Install JDK
uses: actions/setup-java@v2
with:
java-version: ${{ inputs.jdk }}
distribution: temurin
- name: Get project version
run: echo "PROJECT_VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:evaluate -Dexpression=project.version -q -DforceStdout | grep -v '\[')" >> $GITHUB_ENV
- name: Maven deploy
if: ${{ endsWith(env.PROJECT_VERSION, '-SNAPSHOT') }}
run: mvn deploy -s .github/maven-cd-settings.xml -DskipTests -B
33 changes: 33 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Publish
on:
workflow_call:
inputs:
branch:
required: true
type: string
jdk:
default: 8
type: string
jobs:
Deploy:
name: Publish to Pages
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ inputs.branch }}
- name: Install JDK
uses: actions/setup-java@v2
with:
java-version: ${{ inputs.jdk }}
distribution: temurin
- name: Maven deploy
run: mvn package asciidoctor:process-asciidoc
- name: Publish to GitHub Pages
uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
BRANCH: gh-pages
FOLDER: target/docs/advanced-vertx-guide
CLEAN: true
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</parent>

<artifactId>advanced-vertx-guide</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.0.0-SNAPSHOT</version>

<properties>
<stack.version>5.0.0-SNAPSHOT</stack.version>
Expand Down

0 comments on commit 5122c06

Please sign in to comment.