Skip to content

Update build_deploy_qa.yml #392

Update build_deploy_qa.yml

Update build_deploy_qa.yml #392

# 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: Deploy to QA
on:
push:
branches: [ master ]
# temporary disabled due to qa deployements during unmerged pull requests
# pull_request:
# branches: [ master ]
jobs:
build:
name: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
cache: maven
- name: Build with Maven
run: |
cd source
mvn --batch-mode -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn clean install --file pom.xml
deploy:
name: deploy
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v2
- name: Deploy to core server
env:
source: 'source/target/'
destination: '[email protected]:/opt/delivery/'
run: |
echo "${{secrets.DEPLOY_KEY}}" > deploy_key
chmod 600 ./deploy_key
ls /home/runner/work/
ls /home/runner/work/cerberus-core/
ls /home/runner/work/cerberus-core/cerberus-core/
ls /home/runner/work/cerberus-core/cerberus-core/source/
ls /home/runner/.m2/
ls /home/runner/.m2/repository/
ls /home/runner/.m2/repository/org/
ls /home/runner/.m2/repository/org/cerberus/
ls /home/runner/.m2/repository/org/cerberus/cerberus-core/
ls /home/runner/.m2/repository/org/cerberus/cerberus-core/4.17-SNAPSHOT/
sudo rsync -chav \
-e 'ssh -i ./deploy_key -o StrictHostKeyChecking=no' \
--exclude /sass \
${{env.source}} ${{env.destination}}