Skip to content

Commit 87e68ee

Browse files
authored
feat: add GitHub Actions CI and deployment workflows (#9)
* feat: add Samsung FE series, Z Fold 5/6, Z Flip 5/6, and more A series devices - Samsung Galaxy S24 FE, S23 FE, S21 FE, S20 FE - Samsung Galaxy Z Fold 6, Z Fold 5 - Samsung Galaxy Z Flip 6, Z Flip 5 - Samsung Galaxy A56, A53, A36, A16, A14 - Corrected A54/A53/A14 resolution to 1080x2408 * feat: add GitHub Actions CI and deployment workflows (fixes #5)
1 parent c9f7ba6 commit 87e68ee

2 files changed

Lines changed: 77 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- staging
8+
pull_request:
9+
branches:
10+
- '**'
11+
12+
jobs:
13+
build-and-test:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
19+
- name: Setup Bun
20+
uses: oven-sh/setup-bun@v1
21+
with:
22+
bun-version: latest
23+
24+
- name: Install system dependencies for canvas
25+
run: |
26+
sudo apt-get update
27+
sudo apt-get install -y libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
28+
29+
- name: Install dependencies
30+
run: bun install
31+
32+
- name: Lint
33+
run: bun run lint
34+
35+
- name: Test
36+
run: bun test
37+
38+
- name: Build Next.js
39+
run: bun run build
40+
41+
- name: Build Docker image (Verification)
42+
run: docker build -t gitwall-test .

.github/workflows/deploy.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Deploy to DigitalOcean
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Deploy via SSH
13+
uses: appleboy/ssh-action@v1.0.3
14+
with:
15+
host: ${{ secrets.SSH_HOST }}
16+
username: ${{ secrets.SSH_USER }}
17+
key: ${{ secrets.SSH_PRIVATE_KEY }}
18+
script: |
19+
cd GitWall
20+
git pull origin main
21+
docker build -t gitwall .
22+
docker stop gitwall || true
23+
docker rm gitwall || true
24+
docker run -d -p 3000:3000 --name gitwall --restart unless-stopped gitwall
25+
26+
# Wait for container to start
27+
echo "Waiting for Next.js server to start..."
28+
sleep 10
29+
30+
# Health check
31+
if ! curl -f http://localhost:3000/api/health; then
32+
echo "Health check failed!"
33+
exit 1
34+
fi
35+
echo "Health check passed!"

0 commit comments

Comments
 (0)