Skip to content

refactoring

refactoring #19

Workflow file for this run

name: Deploy to Amazon EC2
on:
push:
branches: [ "develop" ]
jobs:
deploy:
name: deploy
runs-on: ubuntu-latest
environment: production
steps:
- name: setting-jdk17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'zulu'
- name: checkout
uses: actions/checkout@v2
#
# - name: test
# run: ./gradlew clean test
- name : build
run: ./gradlew build -x test
- name: copy file to Develop server via ssh key
uses: appleboy/[email protected]
with:
host: ${{ secrets.AWS_HOST }}
username: ${{ secrets.AWS_USERNAME }}
key: ${{ secrets.AWS_SSH_KEY }}
source: "build/libs/*"
target: "/home/ubuntu/apiserver"
- name: deploy
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.AWS_HOST }}
username: ${{ secrets.AWS_USERNAME }}
key: ${{ secrets.AWS_SSH_KEY }}
script: |
sudo systemctl restart apiserver.service