generated from 8iq/nodejs-hackathon-boilerplate-starter-kit
-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (44 loc) · 1.64 KB
/
dev-deploy.yaml
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
name: Dev Deploy
on:
push:
branches:
- dev
jobs:
build:
uses: LamArt/open-schools-platform-frontend/.github/workflows/nextjs.yml@dev
# secrets:
# GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
# GOOGLE_MAPS_API_KEY: ${{ secrets.GOOGLE_MAPS_API_KEY }}
secrets:
HELP_REQUISITES: ${{ secrets.HELP_REQUISITES }}
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
- name: Dev deploy open-schools-platform-frontend
uses: D3rHase/[email protected]
with:
host: ${{secrets.DEV_HOST}}
user: "root"
private_key: ${{secrets.DEV_PRIVATE_KEY}}
command: |
echo '--- START WORK ON REMOTE SERVER ---';
set -e;
echo '--- cd in project root ---';
cd /opt/open-schools-platform-frontend;
echo '--- CHECKOUT ON BRANCH ---';
git checkout dev;
echo '--- Upgrade repo ---';
git pull;
echo '--- cd in schools dir ---';
cd apps/schools;
echo '--- Delete unused docker files ---';
docker system prune --all --force;
echo '--- Create schools dev image ---';
docker build -f dev.Dockerfile -t nextjs-dev .;
echo '--- cd in schools dir ---';
cd /opt/open-schools-platform-frontend;
echo '--- Force updating services ---';
sh force-update-services.sh "dev";
echo '--- Success! ---';