remove backup config command #11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deployment | |
on: | |
push: | |
branches: [ main ] | |
workflow_dispatch: | |
jobs: | |
pre_commit_ci: | |
uses: vutfitdiscord/rubbergod/.github/workflows/lint.yml@main | |
deployment_production: | |
runs-on: ubuntu-latest | |
environment: Production | |
needs: pre_commit_ci | |
if: github.ref == 'refs/heads/main' | |
steps: | |
- name: Execute deployment on SSH | |
uses: appleboy/[email protected] | |
with: | |
host: ${{ secrets.PRODUCTION_HOST }} | |
key: ${{ secrets.PRODUCTION_SSH_KEY }} | |
username: ${{ secrets.PRODUCTION_USERNAME }} | |
port: 22 | |
script: | | |
echo "================== Pull Changes ==================" | |
cd rubbergod | |
git pull | |
echo "================== Build Image ==================" | |
docker build . --tag rubbergod-bot | |
echo "================== Restart Services ==================" | |
docker compose down && docker compose up -d | |
echo "================== Clean Up Images ==================" | |
echo "y" | docker image prune -a |