-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (49 loc) · 1.69 KB
/
Copy pathdocker-deploy.yml
File metadata and controls
59 lines (49 loc) · 1.69 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Docker Build and Deploy
on:
push:
branches:
- main
jobs:
deploy-frontend:
name: Push Frontend Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker
uses: docker/login-action@v2.1.0
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Push to Docker Hub
uses: docker/build-push-action@v4
with:
push: true
context: ./client
tags: ${{ secrets.DOCKER_USERNAME }}/portfolio-frontend:latest
build-args: |
VITE_GITHUB_URL=${{ secrets.VITE_GITHUB_URL }}
VITE_EMAIL_ADDRESS=${{ secrets.VITE_EMAIL_ADDRESS }}
VITE_TELEGRAM_URL=${{ secrets.VITE_TELEGRAM_URL }}
VITE_API_URL=${{ secrets.VITE_API_URL }}
deploy-backend:
name: Push Backend Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker
uses: docker/login-action@v2.1.0
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Push to Docker Hub
uses: docker/build-push-action@v4
with:
push: true
context: ./server
tags: ${{ secrets.DOCKER_USERNAME }}/portfolio-backend:latest