File tree Expand file tree Collapse file tree 2 files changed +48
-0
lines changed Expand file tree Collapse file tree 2 files changed +48
-0
lines changed Original file line number Diff line number Diff line change 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"
Original file line number Diff line number Diff line change 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;" ]
You can’t perform that action at this time.
0 commit comments