This repository has been archived on 2024-05-11. You can view files and clone it, but cannot push or open issues or pull requests.
Corn-Utility/.gitea/workflows/deploy_container.yml
toast 2f8b1bd886
Some checks failed
Build and push container image / build (push) Failing after 1s
Fix workflows
2023-10-20 09:39:13 +11:00

22 lines
611 B
YAML

name: Deploy to production
on:
registry_package:
types: [published]
jobs:
deploy:
runs-on: ubuntu-22.04-node
steps:
- name: SSH into Docker Host
uses: appleboy/ssh-action@55dabf81b49d4120609345970c91507e2d734799 # v1.0.0
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_PRVKEY }}
port: ${{ secrets.SSH_PORT }}
script: |
cd corn-util && \
docker compose pull && \
docker compose up -d --remove-orphans && \
docker image prune -f