-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (32 loc) · 1.32 KB
/
dev.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
name: Dev Server manual deploy
run-name: ${{ github.actor }} is manually deploying DevServer
on:
workflow_dispatch:
jobs:
dev_deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install sshpass
run: sudo apt-get install -y sshpass
- name: DevServer Deploy
env:
SSH_DEV_DEVELOPER_PASSWORD: ${{ secrets.SSH_DEV_DEVELOPER_PASSWORD }}
DEV_GITHUB_CLIENT_ID: ${{ secrets.DEV_GITHUB_CLIENT_ID }}
DEV_GITHUB_CLIENT_SECRETS: ${{ secrets.DEV_GITHUB_CLIENT_SECRETS }}
DEV_MYSQL_USER: ${{ secrets.DEV_MYSQL_USER }}
DEV_MYSQL_PASSWORD: ${{ secrets.DEV_MYSQL_PASSWORD }}
DEV_MYSQL_DATABASE: ${{ secrets.DEV_MYSQL_DATABASE }}
JWT_SECRET: ${{ secrets.DEV_JWT_SECRET }}
run: |
sshpass -p $SSH_DEV_DEVELOPER_PASSWORD \
ssh -o "StrictHostKeyChecking=no" [email protected] \
"cd /home/developer/web10-Lesser && git pull && \
GITHUB_CLIENT_ID=$DEV_GITHUB_CLIENT_ID \
GITHUB_CLIENT_SECRETS=$DEV_GITHUB_CLIENT_SECRETS \
DEV_MYSQL_USER=$DEV_MYSQL_USER \
DEV_MYSQL_PASSWORD=$DEV_MYSQL_PASSWORD \
DEV_MYSQL_DATABASE=$DEV_MYSQL_DATABASE \
JWT_SECRET=$JWT_SECRET \
docker compose -f docker-compose.dev.yml up -d --build"