Skip to content

Updated new United Way of White County logo URL #47

Updated new United Way of White County logo URL

Updated new United Way of White County logo URL #47

Workflow file for this run

# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Build, Test, Deploy
on:
push:
branches: [ master ]
jobs:
compile:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 17, 21 ]
name: Java ${{ matrix.java }} compile
steps:
- uses: actions/checkout@v3
- name: Setup java
uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: ${{ matrix.java }}
cache: 'maven'
- run: mvn -f pom.xml clean compile
build:
runs-on: ubuntu-latest
name: Build, test, deploy
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-:
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: 17
cache: 'maven'
- name: Build and test project
run: mvn -f pom.xml clean verify
- name: Copy Artifact via SSH
uses: appleboy/scp-action@master
with:
host: ${{ secrets.HOST }}
port: ${{ secrets.PORT }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.SSHKEY }}
passphrase: ${{ secrets.PASSPHRASE }}
source: "./target/webapp-beta.jar"
target: "/opt/elpuente/deploy/webapp-beta"
- name: Remotely Restart the Service
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
port: ${{ secrets.PORT }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.SSHKEY }}
passphrase: ${{ secrets.PASSPHRASE }}
script: |
cd /opt/elpuente/deploy
export EL_PUENTE_WEBAPP_TRELLO_API_KEY=${{ secrets.TRELLO_API_KEY }}
export EL_PUENTE_WEBAPP_TRELLO_API_TOKEN=${{ secrets.TRELLO_API_TOKEN }}
export EL_PUENTE_WEBAPP_GOOGLE_MAPS_API_KEY_BETA=${{ secrets.GOOGLE_MAPS_API_KEY_BETA }}
export EL_PUENTE_WEBAPP_GOOGLE_MAPS_API_KEY_PROD=${{ secrets.GOOGLE_MAPS_API_KEY_PROD }}
export EL_PUENTE_WEBAPP_GOOGLE_ANALYTICS_TRACKING_ID=${{ secrets.GOOGLE_ANALYTICS_TRACKING_ID }}
sh deploy.sh webapp-beta
script_stop: true