Skip to content

Update Cathand.yml

Update Cathand.yml #11

Workflow file for this run

name: CatHand
on:
workflow_dispatch:
push:
branches:
- dev
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'
- name: Grant execute permission for gradlew
run: chmod +x ./gradlew
- name: gradlew bootJar
run: ./gradlew bootJar
- name: copy jar to server
uses: appleboy/scp-action@master
with:
host: ${{ secrets.SSH_HOST }}
username: ec2-user
key: ${{ secrets.SSH_KEY }}
port: 22
source: "./build/libs/*.jar"
target: "~"
strip_components: 2
- name: SSH Commands
uses: appleboy/[email protected]
with:
host: ${{ secrets.SSH_HOST }}
username: ec2-user
key: ${{ secrets.SSH_KEY }}
port: 22
script_stop: true
script: |
export JWT_SECRET_KEY=${{secrets.JWT_SECRET_KEY}}
java -jar *.jar