-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (58 loc) · 1.69 KB
/
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Deploy
on:
workflow_dispatch:
push:
branches:
- proof-of-concept
concurrency:
group: test-local-${{ github.ref }}
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: appleboy/[email protected]
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
password: ${{ secrets.SSH_PASSWORD }}
port: ${{ secrets.SSH_PORT }}
script: |
cd /root/ds-etna
git pull
docker compose pull
docker compose up -d
docker compose up -d --build --force-recreate nginx
# test:
# runs-on: ubuntu-latest
# needs:
# - deploy
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-node@v4
# with:
# node-version: lts/iron
# - name: Install test dependencies
# run: npm ci
# - name: Install Playwright browsers
# run: npx playwright install --with-deps
# - name: Run Playwright tests
# run: TEST_DOMAIN=https://develop.tna.dblclk.dev CI=true npx playwright test
# - uses: actions/upload-artifact@v4
# if: always()
# with:
# name: playwright-report
# path: playwright-report/
# retention-days: 30
cleanup:
runs-on: ubuntu-latest
needs:
# - test
- deploy
steps:
- uses: appleboy/[email protected]
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
password: ${{ secrets.SSH_PASSWORD }}
port: ${{ secrets.SSH_PORT }}
script: if df -hP -k /dev/sda1 | awk '{if ($5+0>=80) exit 1}'; then echo "Space OK"; else docker system prune --force --all --volumes; fi