-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (36 loc) · 1.06 KB
/
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
name: Docker Publish
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
REGISTRY: docker.io
BACKEND_IMAGE_NAME: ${{ secrets.DOCKER_USERNAME }}/lithium-player-backend
FRONTEND_IMAGE_NAME: ${{ secrets.DOCKER_USERNAME }}/lithium-player-frontend
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Backend
uses: docker/build-push-action@v6
with:
context: ./backend
push: true
tags: |
${{ env.BACKEND_IMAGE_NAME }}:latest
- name: copy pnpm-lock
run: cp -r pnpm-lock.yaml ./frontend/web/pnpm-lock.yaml
- name: Build and push Frontend
uses: docker/build-push-action@v6
with:
context: ./frontend/web
push: true
tags: |
${{ env.FRONTEND_IMAGE_NAME }}:latest