Skip to content

Commit 41baecb

Browse files
committed
add auto deploy
1 parent c62fcab commit 41baecb

File tree

2 files changed

+46
-1
lines changed

2 files changed

+46
-1
lines changed

.github/workflows/deploy.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Deploy to Docker Hub
2+
3+
on:
4+
push:
5+
branches:
6+
- main # Change to your deployment branch
7+
8+
jobs:
9+
build-and-push:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v3
15+
16+
- name: Set up QEMU
17+
uses: docker/setup-qemu-action@v2
18+
19+
- name: Set up Docker Buildx
20+
uses: docker/setup-buildx-action@v2
21+
22+
- name: Log in to Docker Hub
23+
uses: docker/login-action@v2
24+
with:
25+
username: ${{ secrets.DOCKERHUB_USERNAME }}
26+
password: ${{ secrets.DOCKERHUB_PASSWORD }}
27+
28+
- name: Build and push Docker image
29+
uses: docker/build-push-action@v4
30+
with:
31+
context: .
32+
platforms: linux/amd64
33+
push: true
34+
tags: seanyl/wese:latest

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ $$
1919
You can directly visit the following website to use the tool
2020
https://wese-app.onrender.com
2121

22-
## Locally development
22+
## Locally Development
2323
Install the necessary package
2424
```bash
2525
pip install -r requirements.txt
@@ -30,6 +30,17 @@ before deployment, you need to test by running
3030
gunicorn app:server
3131
```
3232

33+
## Docker Manually Deployment
34+
Rebuild the Docker Image
35+
```bash
36+
docker buildx build --platform linux/amd64 -t seanyl/wese:latest .
37+
```
38+
39+
Push the image to docker hub
40+
```
41+
docker push seanyl/wese:latest
42+
```
43+
3344
# License
3445
The software is available under the MIT license.
3546

0 commit comments

Comments
 (0)