File tree Expand file tree Collapse file tree 2 files changed +36
-4
lines changed
Expand file tree Collapse file tree 2 files changed +36
-4
lines changed Original file line number Diff line number Diff line change 88jobs :
99 Deploy :
1010 runs-on : ubuntu-latest
11+ env :
12+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
1113 steps :
12- - name : Clone repository
13- uses : actions/checkout@v2
14-
1514 - name : Deploy Salaourn Secret Service
1615 uses : appleboy/ssh-action@master
1716 with :
2019 key : ${{ secrets.SSH_KEY }}
2120 port : ${{ secrets.SSH_PORT }}
2221 script : |
23- pwd
22+ REPO_DIR="$(basename ${{ github.repository }})"
23+ if [ -d "$REPO_DIR" ]; then
24+ cd "$REPO_DIR"
25+ git pull origin master
26+ else
27+ git clone https://$GH_TOKEN@github.com/${{ github.repository }}.git
28+ cd "$REPO_DIR"
29+ fi
30+ docker-compose -f docker-compose-prod.yml build --no-cache
31+ docker-compose -f docker-compose-prod.yml up -d --force-recreate
Original file line number Diff line number Diff line change 1+ version : " 3.0"
2+
3+ services :
4+ memcached :
5+ image : memcached
6+ restart : always
7+ expose :
8+ - " 11211"
9+ network_mode : bridge
10+
11+ yopass :
12+ image : yopass:latest
13+ build :
14+ context : .
15+ dockerfile : Dockerfile
16+ restart : always
17+ ports :
18+ - " 127.0.0.1:8080:8080"
19+ command : " --memcached=memcached:11211 --port 8080"
20+ environment :
21+ - VIRTUAL_HOST=secret.salaourn.com
22+ - LETSENCRYPT_HOST=secret.salaourn.com
23+ - LETSENCRYPT_EMAIL=dprisc97@gmail.com
24+ network_mode : bridge
You can’t perform that action at this time.
0 commit comments