LifeMate — Personal, Family & Learning Companion
deploy: publish stable PWA and APK branch
davoodmehraban89 committed
Oct 5, 2026 at 22:08 UTC
0d7126c94d9f511151489d547972aae0139fae1e
1 file changed
+52
.github/workflows/publish-static.yml
new
+52
@@ -0,0 +1,52 @@
1
+name: Publish static PWA and APK
2
+
3
+on:
4
+ push:
5
+ branches: [main]
6
+ workflow_dispatch:
7
+
8
+permissions:
9
+ contents: write
10
+
11
+jobs:
12
+ publish:
13
+ runs-on: ubuntu-latest
14
+ defaults:
15
+ run:
16
+ working-directory: apps/lifemate
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+
20
+ - uses: subosito/flutter-action@v2
21
+ with:
22
+ channel: stable
23
+ cache: true
24
+
25
+ - run: flutter pub get
26
+
27
+ - name: Build PWA against staging API
28
+ run: >
29
+ flutter build web --release
30
+ --dart-define=LIFEMATE_API_URL=https://lifemate-api-fn-staging.up.railway.app
31
+
32
+ - name: Build Android APK against staging API
33
+ run: >
34
+ flutter build apk --release
35
+ --dart-define=LIFEMATE_API_URL=https://lifemate-api-fn-staging.up.railway.app
36
+
37
+ - name: Prepare static release directory
38
+ run: |
39
+ rm -rf ../../public-release
40
+ mkdir -p ../../public-release/downloads
41
+ cp -R build/web/. ../../public-release/
42
+ cp build/app/outputs/flutter-apk/app-release.apk ../../public-release/downloads/LifeMate.apk
43
+ touch ../../public-release/.nojekyll
44
+
45
+ - name: Publish immutable static branch
46
+ uses: peaceiris/actions-gh-pages@v4
47
+ with:
48
+ github_token: ${{ secrets.GITHUB_TOKEN }}
49
+ publish_branch: deployment-static
50
+ publish_dir: ./public-release
51
+ force_orphan: true
52
+ commit_message: "publish: LifeMate PWA and APK ${{ github.sha }}"