Skip to content

Commit 081382e

Browse files
committed
Deploy
1 parent 377a929 commit 081382e

File tree

2 files changed

+19
-25
lines changed

2 files changed

+19
-25
lines changed

.github/workflows/deploy.yml

Lines changed: 13 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55
branches: [ "master" ]
66
release:
7-
types: [published]
7+
types: [ published ]
88

99
jobs:
1010
build:
@@ -13,34 +13,23 @@ jobs:
1313
contents: read
1414
packages: write
1515
steps:
16-
- uses: actions/checkout@v3
17-
-
18-
name: Login to GitHub Container Registry
16+
# Checkout the repository and submodules
17+
- name: Checkout code and submodules
18+
uses: actions/checkout@v3
19+
with:
20+
submodules: recursive # Ensures submodules are fetched
21+
fetch-depth: 0 # Ensures the full history is fetched
22+
23+
# Log in to GitHub Container Registry
24+
- name: Login to GitHub Container Registry
1925
uses: docker/login-action@v2
2026
with:
2127
registry: ghcr.io
2228
username: ${{ github.actor }}
2329
password: ${{ secrets.GITHUB_TOKEN }}
24-
# - name: Install SSH Key
25-
# uses: shimataro/ssh-key-action@v2
26-
# with:
27-
# key: ${{ secrets.PIPELINE_PRIVATE_KEY }}
28-
# known_hosts: unnecessary
29-
- name: Build the Docker image
30+
31+
# Build and push the Docker image
32+
- name: Build and Push Docker Image
3033
run: |
3134
docker build . --file Dockerfile --tag ghcr.io/bossboxing/friendblockly:latest
3235
docker push ghcr.io/bossboxing/friendblockly:latest
33-
# - name: Deploy To Server
34-
# uses: appleboy/ssh-action@master
35-
# with:
36-
# host: ${{ secrets.HOST }}
37-
# username: 'root'
38-
# password: ${{ secrets.PASSWORD }}
39-
# # key: ${{ secrets.PIPELINE_PRIVATE_KEY }}
40-
# port: 22
41-
# script: |
42-
# cd /root/workspace/
43-
# docker compose pull markodd-backend
44-
# docker compose up -d markodd-backend
45-
# docker image prune -af
46-

Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,18 @@ FROM python:3.12-slim
44
# Set the working directory
55
WORKDIR /app
66

7+
# Install system dependencies (including Git)
8+
RUN apt-get update && apt-get install -y \
9+
git \
10+
&& apt-get clean
11+
712
# Copy main repository files
813
COPY . .
914

1015
# Initialize and update submodules
1116
RUN git submodule update --init --recursive
1217

13-
# Install dependencies
18+
# Install Python dependencies
1419
RUN pip install -r requirements.txt
1520

1621
# Expose the port your application uses

0 commit comments

Comments
 (0)