-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (39 loc) · 1.38 KB
/
production-deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: production-deploy
on:
push:
branches:
- main
- temp-perf-mp-tracking
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch
- name: Run deploy on production
uses: appleboy/[email protected]
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_KEY }}
port: ${{ secrets.SSH_PORT }}
script_stop: true
script: |
cd /home/akatsuki/pep.py
git fetch origin
git checkout origin/${{ steps.extract_branch.outputs.branch }}
git pull origin ${{ steps.extract_branch.outputs.branch }}
docker build -t bancho-service:latest .
cd /home/akatsuki/workbench
docker-compose stop \
bancho-service-api \
bancho-service-spam-protection-cronjob \
bancho-service-inactivity-timeout-cronjob \
bancho-service-consume-pubsub-events-daemon
docker-compose up -d bancho-service-api \
bancho-service-spam-protection-cronjob \
bancho-service-inactivity-timeout-cronjob \
bancho-service-consume-pubsub-events-daemon