Skip to content

Update copyright headers and add javaformat plugin #16

Update copyright headers and add javaformat plugin

Update copyright headers and add javaformat plugin #16

name: CI/CD build
on:
push:
branches: [ "main" ]
jobs:
build:
name: Build branch
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: 'maven'
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Build with Maven and deploy to Artifactory
env:
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
run: |
mvn -s settings.xml -Pjavadoc --batch-mode --update-snapshots deploy
- name: Generate Java docs
run: mvn -Pjavadoc -B javadoc:aggregate
- name: Capture project version
run: echo PROJECT_VERSION=$(mvn help:evaluate -Dexpression=project.version --quiet -DforceStdout) >> $GITHUB_ENV
# - name: Generate assembly
# working-directory: spring-ai-docs
# run: mvn assembly:single
# - name: Setup SSH key
# env:
# DOCS_SSH_KEY: ${{ secrets.DOCS_SSH_KEY }}
# DOCS_SSH_HOST_KEY: ${{ secrets.DOCS_SSH_HOST_KEY }}
# run: |
# mkdir "$HOME/.ssh"
# echo "$DOCS_SSH_KEY" > "$HOME/.ssh/key"
# chmod 600 "$HOME/.ssh/key"
# echo "$DOCS_SSH_HOST_KEY" > "$HOME/.ssh/known_hosts"
#
# - name: Deploy docs
# env:
# DOCS_HOST: ${{ secrets.DOCS_HOST }}
# DOCS_PATH: ${{ secrets.DOCS_PATH }}
# DOCS_USERNAME: ${{ secrets.DOCS_USERNAME }}
# working-directory: spring-ai-docs/target
# run: |
# unzip spring-ai-$PROJECT_VERSION-docs.zip
# ssh -i $HOME/.ssh/key $DOCS_USERNAME@$DOCS_HOST "cd $DOCS_PATH && mkdir -p $PROJECT_VERSION"
# scp -i $HOME/.ssh/key -r api $DOCS_USERNAME@$DOCS_HOST:$DOCS_PATH/$PROJECT_VERSION