Skip to content

Commit

Permalink
deploy: production server deployment only by manual run
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtemSBulgakov committed Jan 24, 2024
1 parent 7d4b8e8 commit c89c293
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/deploy-production.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Deploy to production server

concurrency:
group: production
cancel-in-progress: false

on:
workflow_dispatch:

jobs:
deploy:
name: Deploy to production server
runs-on: self-hosted
environment:
name: production
url: https://innohassle.ru
steps:
- name: Deploy via SSH
uses: appleboy/[email protected]
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_KEY }}
fingerprint: ${{ secrets.SSH_FINGERPRINT }}
script_stop: true # Stop script on error
script: |
cd ${{ secrets.REPOSITORY_ROOT }}
git reset --hard
git checkout ${{ github.ref_name }}
git pull
docker compose build
docker compose pull
docker compose up -d

0 comments on commit c89c293

Please sign in to comment.