Skip to content

Update cicd.yml

Update cicd.yml #29

Workflow file for this run

name: Deploy
on:
push:
branches: [main,cicd]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build & Deploy
uses: appleboy/ssh-action@master
env:
openai.key : ${{ secrets.OPENAI_KEY }}
cloud.aws.credentials.accessKey: ${{ secrets.S3_ACCESS_KEY }}
cloud.aws.credentials.accessKeyProfile: ${{ secrets.S3_ACCESS_PROFILE_KEY }}
cloud.aws.credentials.secretKey: ${{ secrets.S3_SECRET_KEY }}
cloud.aws.credentials.secretKeyProfile : ${{ secrets.S3_SECRET_PROFILE_KEY }}
jwt.secretKey : ${{ secrets.JWT_SECRET_KEY }}
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.PRIVATE_KEY }}
port: ${{ secrets.PORT }}
script: |
chmod +x ./deploy.sh
cd /home/ubuntu/back-end
./gradlew clean build -x test
cd /home/ubuntu/back-end/build/libs
./deploy.sh