-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3b1c954
commit 22e5dd6
Showing
3 changed files
with
123 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: maven | ||
directory: /quarkus-workshop-super-heroes | ||
open-pull-requests-limit: 40 | ||
schedule: | ||
interval: daily | ||
labels: | ||
- "version-upgrade" | ||
pull-request-branch-name: | ||
separator: "_" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
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: Build | ||
run: mvn -B install | ||
docs: | ||
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 docs | ||
mvn package | ||
- name: Publishing fragment | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: fragments | ||
path: ./docs/target/generated-asciidoc | ||
if-no-files-found: error | ||
retention-days: 3 | ||
publication: | ||
needs: [ docs, build ] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Download default site | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: fragments | ||
path: target/generated-asciidoc | ||
- name: Site assembly | ||
run: | | ||
mkdir -p target/site | ||
cp -R target/generated-asciidoc/* target/site | ||
- name: Store PR id | ||
if: "github.event_name == 'pull_request'" | ||
run: echo ${{ github.event.number }} > ./target/site/pr-id.txt | ||
- name: Publishing directory for PR preview | ||
if: "github.event_name == 'pull_request'" | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: site | ||
path: ./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: ./target/site |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Generate zips | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- 'docs/**' | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
concurrency: zip-generation | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: temurin | ||
java-version: 17 | ||
run: mvn -B install | ||
publication: | ||
needs: [ build ] | ||
runs-on: ubuntu-latest | ||
concurrency: zip-generation | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: temurin | ||
java-version: 17 | ||
- name: Generate zips | ||
run: | | ||
mvn package -N | ||
- name: Commit zips | ||
run: | | ||
git config --global user.name 'Github Actions' | ||
git config --global user.email '[email protected]' | ||
git commit -am "Automated zip generation" | ||
git push |