Skip to content

Commit

Permalink
Create Actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
hdpe authored Oct 23, 2023
1 parent c3f9028 commit 553a9c0
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Build

on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'

- name: Build with Maven
run: |
if [[ "$GITHUB_REF" =~ ^refs/tags/ ]]; then \
PHASES="install site" \
elif [[ "$GITHUB_EVENT_NAME" = "pull_request" ]]; then \
PHASES="verify" \
else \
PHASES="deploy" \
fi && \
mvn -B -s config/settings.ci.xml $PHASES -PrunITs
- uses: actions/upload-pages-artifact@v1
if: ${{ startsWith(github.ref, 'refs/tags/' }}
with:
path: client/target/generated-docs

deploy-pages:
if: ${{ startsWith(github.ref, 'refs/tags/' }}

needs: build

permissions:
pages: write
id-token: write

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2

0 comments on commit 553a9c0

Please sign in to comment.