Skip to content

Coderize

Coderize #39

Workflow file for this run

name: Testing
on:
push:
branches: [ "master" ]
concurrency:
group: github-pages
cancel-in-progress: false
permissions:
contents: read
pages: write
id-token: write
jobs:
test:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: 21
distribution: 'temurin'
cache: maven
- name: Test with Maven
run: mvn clean test --file pom.xml
build:
runs-on: ubuntu-24.04
needs: test
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: 21
distribution: 'temurin'
cache: maven
- name: Deploy site
run: mvn clean site --file pom.xml
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload Artifacts
uses: actions/upload-pages-artifact@v3
with:
path: ./target/site
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
deploy:
runs-on: ubuntu-24.04
needs: build
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- run: sed -i 's|http://localhost:8080/|${{ secrets.TOMCAT_HOST }}|g' pom.xml
- name: Set up Maven Central Repository
uses: actions/setup-java@v4
with:
java-version: 21
distribution: 'temurin'
cache: maven
server-id: TomcatServer
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Deploy package
run: mvn --batch-mode tomcat7:deploy
env:
MAVEN_USERNAME: ${{ secrets.TOMCAT_USER }}
MAVEN_PASSWORD: ${{ secrets.TOMCAT_PASS }}