Skip to content

Commit be7904f

Browse files
committed
Merge branch 'main' of github.com:sengthaite/sengthaite.github.io
2 parents c20620c + 515d14c commit be7904f

207 files changed

Lines changed: 8313 additions & 2441 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
name: Flutter CI/CD - Build APK & Deploy Web
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*' # Trigger on version tags (e.g., v1.0.0)
7+
8+
env:
9+
FLUTTER_VERSION: '3.38.5' # Specify your Flutter version
10+
BUILD_NUMBER: ${{ github.run_number }}
11+
BUILD_DATE: ${{ github.event.head_commit.timestamp }}
12+
13+
jobs:
14+
build-android:
15+
runs-on: ubuntu-latest
16+
permissions:
17+
contents: write # Required for creating releases
18+
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v4
22+
23+
- name: Set up Java
24+
uses: actions/setup-java@v3
25+
with:
26+
distribution: 'temurin'
27+
java-version: '21'
28+
29+
- name: Set up Flutter
30+
uses: subosito/flutter-action@v2
31+
with:
32+
flutter-version: ${{ env.FLUTTER_VERSION }}
33+
channel: stable
34+
cache: true
35+
36+
- name: Install dependencies
37+
run: flutter pub get
38+
39+
- name: Verify Flutter installation
40+
run: flutter doctor -v
41+
42+
- name: Build APK (Release - Unsigned)
43+
run: |
44+
flutter build apk --release --target-platform android-arm64
45+
echo "APK built successfully!"
46+
ls -la build/app/outputs/flutter-apk/
47+
48+
- name: Upload APK artifact
49+
uses: actions/upload-artifact@v4
50+
with:
51+
name: app-release-unsigned
52+
path: build/app/outputs/flutter-apk/app-release-arm64.apk
53+
retention-days: 2
54+
55+
- name: Create GitHub Release
56+
if: startsWith(github.ref, 'refs/tags/v')
57+
uses: softprops/action-gh-release@v1
58+
with:
59+
files: build/app/outputs/flutter-apk/app-release-arm64.apk
60+
generate_release_notes: true
61+
prerelease: false
62+
draft: false
63+
env:
64+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
65+
66+
build-web:
67+
environment:
68+
name: github-pages
69+
runs-on: ubuntu-latest
70+
permissions:
71+
contents: write # Required for gh-pages deployment
72+
pages: write
73+
id-token: write
74+
75+
steps:
76+
- name: Checkout code
77+
uses: actions/checkout@v4
78+
79+
- name: Set up Flutter
80+
uses: subosito/flutter-action@v2
81+
with:
82+
flutter-version: ${{ env.FLUTTER_VERSION }}
83+
channel: stable
84+
cache: true
85+
86+
- name: Install dependencies
87+
run: flutter pub get
88+
89+
- name: Build Web App
90+
run: |
91+
flutter config --enable-web
92+
flutter build web --release --base-href "/"
93+
echo "Web build completed!"
94+
95+
- name: Deploy to GitHub Pages
96+
uses: peaceiris/actions-gh-pages@v4
97+
with:
98+
github_token: ${{ secrets.GITHUB_TOKEN }}
99+
publish_dir: ./build/web

.gitignore

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
*.log
44
*.pyc
55
*.swp
6+
*.cxx/
67
.DS_Store
78
.atom/
89
.build/
@@ -32,6 +33,10 @@ migrate_working_dir/
3233
.pub-cache/
3334
.pub/
3435
/build/
36+
dist/**
37+
38+
# NodeJs related
39+
**/node_modules/
3540

3641
# Symbolication related
3742
app.*.symbols
@@ -45,4 +50,9 @@ app.*.map.json
4550
/android/app/release
4651

4752
# FVM Version Cache
48-
.fvm/
53+
.fvm/
54+
**/API_DIR
55+
56+
# Persistent data
57+
.hive_data
58+
**/.hive_data

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"python.terminal.activateEnvInCurrentTerminal": true,
33
"python.defaultInterpreterPath": "${workspaceFolder}/venv/bin/python3"
4-
}
4+
}

Makefile

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,24 @@
1-
.PHONY: all check autogen rebuild build_runner deploy pip_install run_web
1+
2+
.PHONY: all check autogen rebuild build_runner deploy pip_install build_web gen_l10n gen_icon run_web
23

34
run_web:
45
flutter run -d web-server --web-hostname 0.0.0.0 --web-port 7777
56

7+
gen_icon:
8+
dart run icons_launcher:create
9+
10+
gen_l10n:
11+
flutter gen-l10n
12+
13+
dist_linux:
14+
flutter_distributor release --name=dev --jobs=release-dev-linux-deb
15+
16+
build_linux:
17+
flutter build linux --release
18+
19+
build_web:
20+
flutter build web --base-href=/ --wasm
21+
622
autogen:
723
python3 ./scripts/autogen.py
824

@@ -11,7 +27,6 @@ pip_install:
1127

1228
clean:
1329
rm -rf ./assets/autogen_meta
14-
rm -rf ./build
1530

1631
build_runner:
1732
dart run build_runner build --delete-conflicting-outputs
@@ -21,9 +36,12 @@ check:
2136

2237
add_assets:
2338
asset_manager add
24-
39+
2540
all: clean autogen build_runner
2641

27-
deploy: clean all
28-
flutter pub global run dependency_validator
29-
flutter pub global run peanut --wasm --extra-args --base-href=/
42+
deploy: clean all gen_l10n
43+
# flutter pub global run dependency_validator
44+
flutter pub global run peanut --extra-args --base-href=/ --no-wasm --release
45+
git push origin --set-upstream gh-pages
46+
47+
# dart run rename_app:main all="My App Name"

README.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,19 @@
1-
# SENGTHAITE_BLOG
1+
# Ste Glob
22

3-
My personal blog includes computer topics, operating system stuffs, useful tools, small projects, and general contents.
4-
# sengthaite.github.io
3+
### Reading
4+
5+
|#|Topic|Description|
6+
|---|---|---|
7+
|1|Health Content||
8+
|2|Computer Knowledge||
9+
|3|Useful Khmer Proverbs||
10+
11+
### Useful Tools
12+
|#|Topic|Description|
13+
|---|---|---|
14+
|1|Text Editor|Taking note and view later|
15+
|2|Http Request|API request inspired by postman|
16+
17+
### Projects
18+
19+
NA

analysis_options.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77

88
# The following line activates a set of recommended lints for Flutter apps,
99
# packages, and plugins designed to encourage good coding practices.
10+
analyzer:
11+
errors:
12+
implementation_imports: ignore
1013
include: package:flutter_lints/flutter.yaml
1114

1215
linter:
@@ -23,6 +26,5 @@ linter:
2326
rules:
2427
# avoid_print: false # Uncomment to disable the `avoid_print` rule
2528
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
26-
2729
# Additional information about this file can be found at
2830
# https://dart.dev/guides/language/analysis-options

android/app/src/main/AndroidManifest.xml

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,19 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2-
<application
3-
android:label="sengthaite_blog"
4-
android:name="${applicationName}"
5-
android:icon="@mipmap/ic_launcher">
6-
<activity
7-
android:name=".MainActivity"
8-
android:exported="true"
9-
android:launchMode="singleTop"
10-
android:theme="@style/LaunchTheme"
11-
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
12-
android:hardwareAccelerated="true"
13-
android:windowSoftInputMode="adjustResize">
2+
<application android:label="Ste Glob" android:name="${applicationName}" android:icon="@mipmap/ic_launcher">
3+
<activity android:name=".MainActivity" android:exported="true" android:launchMode="singleTop" android:theme="@style/LaunchTheme" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:hardwareAccelerated="true" android:windowSoftInputMode="adjustResize">
144
<!-- Specifies an Android theme to apply to this Activity as soon as
155
the Android process has started. This theme is visible to the user
166
while the Flutter UI initializes. After that, this theme continues
177
to determine the Window background behind the Flutter UI. -->
18-
<meta-data
19-
android:name="io.flutter.embedding.android.NormalTheme"
20-
android:resource="@style/NormalTheme"
21-
/>
8+
<meta-data android:name="io.flutter.embedding.android.NormalTheme" android:resource="@style/NormalTheme"/>
229
<intent-filter>
2310
<action android:name="android.intent.action.MAIN"/>
2411
<category android:name="android.intent.category.LAUNCHER"/>
2512
</intent-filter>
2613
</activity>
2714
<!-- Don't delete the meta-data below.
2815
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
29-
<meta-data
30-
android:name="flutterEmbedding"
31-
android:value="2" />
16+
<meta-data android:name="flutterEmbedding" android:value="2"/>
3217
</application>
3318
<!-- Required to query activities that can process text, see:
3419
https://developer.android.com/training/package-visibility?hl=en and
6.76 KB
Loading
1.19 KB
Loading
1.72 KB
Loading

0 commit comments

Comments
 (0)