Skip to content

Commit

Permalink
FEAT: Added deploy workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
thinley4 committed Oct 20, 2024
1 parent 07ceed1 commit 91c6478
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
30 changes: 30 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Build and Deploy to Docker Hub

on:
push:
branches:
- main

jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Check Out Repo
uses: actions/checkout@v4

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and Push Docker image
uses: docker/build-push-action@v6
with:
context: .
file: ./web/Dockerfile
push: true
tags: thinley44/dchat-web:latest # Replace with your Docker Hub username and repository

- name: Verify Pushed Image
run: docker pull thinley44/dchat-web:latest # Replace with your Docker Hub username and repository
2 changes: 1 addition & 1 deletion docker/Dockerfile.web → web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM node:20.12.0-alpine3.19

WORKDIR /app

COPY ./web .
COPY . .

RUN npm install

Expand Down

0 comments on commit 91c6478

Please sign in to comment.