-
Notifications
You must be signed in to change notification settings - Fork 1
32 lines (25 loc) · 901 Bytes
/
docker.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
name: Docker Prod
on:
workflow_dispatch:
push:
branches: [main]
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: self-hosted
steps:
- uses: actions/checkout@v3
- name: Create env file
run: |
touch .env
echo SECRET=${{ secrets.SECRET }} >> .env
echo DATABASE_URL=${{ secrets.DATABASE_URL }} >> .env
echo NEXT_PUBLIC_URL=${{ secrets.NEXT_PUBLIC_URL }} >> .env
echo NEXT_PUBLIC_API_URL=${{ secrets.NEXT_PUBLIC_API_URL }} >> .env
echo NEXT_PUBLIC_SMTP_HOST=${{ secrets.NEXT_PUBLIC_SMTP_HOST }} >> .env
echo NEXT_PUBLIC_SMTP_USER=${{ secrets.NEXT_PUBLIC_SMTP_USER }} >> .env
echo NEXT_PUBLIC_SMTP_PASS=${{ secrets.NEXT_PUBLIC_SMTP_PASS }} >> .env
- name: Docker run
run: docker compose up -d --force-recreate --build