-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (40 loc) · 1.23 KB
/
deploy-main.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
name: Deploy Productions server
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: main
steps:
- name: Check out the repository
uses: actions/checkout@v2
with:
ref: main
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Set up pseudolab config
run: |
sh -c "${{ secrets.RUN_SCRIPT }}"
- name: Shut down Docker Compose
run: |
docker compose -f docker-compose.yaml down
- name: Build and push Docker images
env:
DB_ROOT: ${{ secrets.DB_ROOT }}
DB_ROOT_PASSWORD: ${{ secrets.DB_ROOT_PASSWORD }}
DB_USER: ${{ secrets.DB_USER }}
DB_PASSWORD: ${{ secrets.DB_PASSWORD }}
DB_DATABASE: ${{ secrets.DB_DATABASE }}
run: |
docker compose -f docker-compose.yaml build
- name: Run Docker Compose
env:
DB_ROOT: ${{ secrets.DB_ROOT }}
DB_ROOT_PASSWORD: ${{ secrets.DB_ROOT_PASSWORD }}
DB_USER: ${{ secrets.DB_USER }}
DB_PASSWORD: ${{ secrets.DB_PASSWORD }}
DB_DATABASE: ${{ secrets.DB_DATABASE }}
run: |
docker compose -f docker-compose.yaml up -d