Skip to content

Commit 8a23e34

Browse files
committed
new changes
2 parents 1899445 + 5a0455e commit 8a23e34

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

.github/workflows/dart.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Trigger Flutter Deploy on Render
2+
3+
on:
4+
push:
5+
branches: [main] # or whichever branch your Render site is watching
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Trigger Render Deploy Hook
13+
run: |
14+
curl -fsSL -X POST \
15+
-H "Content-Type: application/json" \
16+
-d '{"trigger":"github-action"}' \
17+
"https://api.render.com/deploy/srv-d1qtv33uibrs73etd8gg?key=FUF7RSimw8E"

Dockerfile

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
###############################################################################
2+
# 1 ─ BUILD STAGE #
3+
###############################################################################
4+
# Use the official Flutter image with the latest stable SDK (3.22 at July 2025)
5+
FROM cirrusci/flutter:3.22 AS build
6+
7+
# Set working directory inside the container
8+
WORKDIR /app
9+
10+
# --- Caching trick: copy pubspec first, fetch deps, then rest of the code ----
11+
COPY pubspec.* ./
12+
RUN flutter pub get
13+
14+
# Copy the rest of the sources and build the web release bundle
15+
COPY . .
16+
RUN flutter build web --release # output → build/web
17+
18+
###############################################################################
19+
# 2 ─ RUNTIME STAGE (static site) #
20+
###############################################################################
21+
FROM nginx:stable-alpine
22+
23+
# Remove default Nginx html & copy Flutter build
24+
RUN rm -rf /usr/share/nginx/html/*
25+
COPY --from=build /app/build/web /usr/share/nginx/html
26+
27+
# Expose web port
28+
EXPOSE 80
29+
30+
# Start Nginx in the foreground (Render auto-detects this)
31+
CMD ["nginx", "-g", "daemon off;"]

0 commit comments

Comments
 (0)