Skip to content

GPT To Redis Batch Job #26

GPT To Redis Batch Job

GPT To Redis Batch Job #26

name: GPT To Redis Batch Job
on:
workflow_dispatch:
push:
branches:
- main
schedule:
- cron: '0 2 * * *'
jobs:
batch-job:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Docker Build And Push
run: |
docker login -u ${{ secrets.USERNAME }} -p ${{ secrets.PASSWORD }}
docker build -f gpt.Dockerfile -t skku-gpt-to-redis-batch .
docker tag skku-gpt-to-redis-batch sinkyoungdeok/skku-gpt-to-redis-batch
docker push sinkyoungdeok/skku-gpt-to-redis-batch
- name: Deploy Prod
uses: appleboy/[email protected]
with:
key: ${{ secrets.SSH_KEY }}
host: ${{ secrets.HOST_NAME }}
username: ubuntu
port: 22
script: |
docker login -u ${{ secrets.USERNAME }} -p ${{ secrets.PASSWORD }}
docker pull sinkyoungdeok/skku-gpt-to-redis-batch
docker run --net ubuntu_default -e OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }} sinkyoungdeok/skku-gpt-to-redis-batch