39 lines
885 B
YAML
39 lines
885 B
YAML
name: Docker Deploy
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
build_and_deploy:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
- name: Login to Docker Hub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_TOKEN }}
|
|
|
|
|
|
- name: Build and push Docker frontend image
|
|
uses: docker/build-push-action@v3
|
|
with:
|
|
context: ./frontend
|
|
file: ./frontend/Dockerfile
|
|
push: true
|
|
tags: azpect3120/file.gophernest.frontend:latest
|
|
|
|
- name: Build and push Docker backend image
|
|
uses: docker/build-push-action@v3
|
|
with:
|
|
context: ./backend
|
|
file: ./backend/Dockerfile
|
|
push: true
|
|
tags: azpect3120/file.gophernest.backend:latest
|