-
Notifications
You must be signed in to change notification settings - Fork 22
38 lines (35 loc) · 1.02 KB
/
cd_frontend.yml
File metadata and controls
38 lines (35 loc) · 1.02 KB
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
name: Deploy the frontend
on:
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v4
- name: Docker login
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Verify secrets
run: |
if [ -z "${{ secrets.DATABASE_URL }}" ]; then
echo "Error: DATABASE_URL secret is not set"
exit 1
fi
if [ -z "${{ secrets.JWT_SECRET }}" ]; then
echo "Error: JWT_SECRET secret is not set"
exit 1
fi
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: ./docker/Dockerfile.frontend
build-args: |
DATABASE_URL=${{ secrets.DATABASE_URL }}
JWT_SECRET=${{ secrets.JWT_SECRET }}
push: true
tags: coderomm/collabydraw:${{ github.sha }}