Skip to content

Commit b8e90a0

Browse files
committed
Image Workflow
1 parent afdaf0b commit b8e90a0

3 files changed

Lines changed: 27 additions & 1 deletion

File tree

.github/workflows/docker.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Build & Push Docker Image
2+
on:
3+
push:
4+
branches:
5+
- master
6+
7+
jobs:
8+
build-and-push:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout repository
12+
uses: actions/checkout@v3
13+
- name: Log in to GitHub Container Registry
14+
uses: docker/login-action@v2
15+
with:
16+
registry: ghcr.io
17+
username: ${{ github.actor }}
18+
password: ${{ secrets.GITHUB_TOKEN }}
19+
- name: Build Docker image
20+
run: |
21+
docker build -t ghcr.io/${{ github.repository_owner }}/neyrowz:latest ./website
22+
- name: Push Docker image
23+
run: |
24+
docker push ghcr.io/${{ github.repository_owner }}/neyrowz:latest

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
## Production
22
```sh
3+
docker login ghcr.io
4+
docker pull ghcr.io/NeyrowZ/neyrowz:latest
35
docker compose up -d
46
```

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ services:
3131
restart: always
3232

3333
website:
34-
build: ./website
34+
image: ghcr.io/NeyrowZ/neyrowz:latest
3535
environment:
3636
- VIRTUAL_HOST=${DOMAIN}
3737
- LETSENCRYPT_HOST=${DOMAIN}

0 commit comments

Comments
 (0)