-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (36 loc) · 1.17 KB
/
manual-deploy-docker.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: Deploy to server via docker image
on:
# push:
# branches: ["master"]
workflow_dispatch:
jobs:
deploy:
name: Deploy to Server manually
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: upload infrastructure files
uses: appleboy/[email protected]
with:
host: ${{ secrets.SSH_SECONDARY_HOST }}
username: ${{ secrets.SSH_SECONDARY_USERNAME }}
password: ${{ secrets.SSH_SECONDARY_PASSWORD }}
port: ${{ secrets.SSH_SECONDARY_PORT }}
source: infrastructure/*
target: spybot
strip_components: 1
- name: execute remote ssh commands
uses: appleboy/ssh-action@master
env:
SECRET: ${{ secrets.ENV_FILE }}
COMMIT_SHA: ${{ github.sha }}
with:
host: ${{ secrets.SSH_SECONDARY_HOST }}
username: ${{ secrets.SSH_SECONDARY_USERNAME }}
password: ${{ secrets.SSH_SECONDARY_PASSWORD }}
port: ${{ secrets.SSH_SECONDARY_PORT }}
envs: SECRET,COMMIT_SHA
script: |
cd spybot
echo "$SECRET" > .env
docker compose -f docker-compose.yml up -d