-
Notifications
You must be signed in to change notification settings - Fork 3
41 lines (35 loc) · 1.45 KB
/
stack_dev.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
41
name: dev.directory.platform.coop
on:
push:
branches:
- dev
env:
PROJECT_ID: dev
PROJECT_SMOKETEST_URL: https://dev.directory.platform.coop
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Deploy stack
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SSH_HOSTNAME }}
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
port: ${{ secrets.SSH_PORT }}
envs: PROJECT_ID
script: |
cd /srv/dev.directory.platform.coop && \
git checkout dev && \
git pull && \
source deploy.env && \
/usr/local/bin/docker-compose -p $PROJECT_ID \
-f docker-compose.yml \
up --force-recreate --build -d && \
/usr/local/bin/docker-compose -p $PROJECT_ID \
-f docker-compose.yml \
run app python manage.py migrate
- name: Wait
run: sleep 15
- name: Smoke test
run: curl --location --no-buffer --retry 120 --retry-delay 1 $PROJECT_SMOKETEST_URL