Merge pull request #7 from sBubshait/feature/view-post-comments
Feature/view post comments
This commit is contained in:
commit
723abf5823
34
.github/workflows/deploy-prod.yml
vendored
Normal file
34
.github/workflows/deploy-prod.yml
vendored
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
name: Deploy to Production
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
name: Deploy to Production
|
||||||
|
needs: build_and_push
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
|
||||||
|
environment: production
|
||||||
|
steps:
|
||||||
|
- name: Deploy to Server
|
||||||
|
uses: appleboy/ssh-action@v0.1.5
|
||||||
|
with:
|
||||||
|
host: ${{ secrets.SERVER_HOST }}
|
||||||
|
username: ${{ secrets.SERVER_USERNAME }}
|
||||||
|
key: ${{ secrets.SERVER_SSH_KEY }}
|
||||||
|
port: ${{ secrets.SERVER_PORT }}
|
||||||
|
script: |
|
||||||
|
whoami
|
||||||
|
|
||||||
|
cd /home/wesal
|
||||||
|
|
||||||
|
git pull origin main
|
||||||
|
|
||||||
|
docker compose down
|
||||||
|
|
||||||
|
docker compose up -d --build
|
||||||
|
|
||||||
|
docker image prune -f
|
||||||
68
.github/workflows/firebase-hosting-merge.yml
vendored
68
.github/workflows/firebase-hosting-merge.yml
vendored
@ -1,40 +1,40 @@
|
|||||||
# This file was auto-generated by the Firebase CLI
|
# # This file was auto-generated by the Firebase CLI
|
||||||
# https://github.com/firebase/firebase-tools
|
# # https://github.com/firebase/firebase-tools
|
||||||
|
|
||||||
name: Deploy to Firebase Hosting on merge
|
# name: Deploy to Firebase Hosting on merge
|
||||||
on:
|
# on:
|
||||||
push:
|
# push:
|
||||||
branches:
|
# branches:
|
||||||
- main
|
# - main
|
||||||
jobs:
|
# jobs:
|
||||||
build_and_deploy:
|
# build_and_deploy:
|
||||||
runs-on: ubuntu-latest
|
# runs-on: ubuntu-latest
|
||||||
steps:
|
# steps:
|
||||||
- name: Checkout code
|
# - name: Checkout code
|
||||||
uses: actions/checkout@v3
|
# uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Set up Flutter
|
# - name: Set up Flutter
|
||||||
uses: subosito/flutter-action@v2
|
# uses: subosito/flutter-action@v2
|
||||||
with:
|
# with:
|
||||||
flutter-version: '3.32.6'
|
# flutter-version: '3.32.6'
|
||||||
channel: stable
|
# channel: stable
|
||||||
|
|
||||||
- name: Install dependencies
|
# - name: Install dependencies
|
||||||
working-directory: frontend
|
# working-directory: frontend
|
||||||
run: flutter pub get
|
# run: flutter pub get
|
||||||
|
|
||||||
# - name: Run tests
|
# # - name: Run tests
|
||||||
# run: flutter test
|
# # run: flutter test
|
||||||
|
|
||||||
- name: Build Flutter Web
|
# - name: Build Flutter Web
|
||||||
working-directory: frontend
|
# working-directory: frontend
|
||||||
run: flutter build web --release
|
# run: flutter build web --release
|
||||||
|
|
||||||
- name: Deploy to Firebase Hosting
|
# - name: Deploy to Firebase Hosting
|
||||||
uses: FirebaseExtended/action-hosting-deploy@v0
|
# uses: FirebaseExtended/action-hosting-deploy@v0
|
||||||
with:
|
# with:
|
||||||
repoToken: ${{ secrets.GITHUB_TOKEN }}
|
# repoToken: ${{ secrets.GITHUB_TOKEN }}
|
||||||
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_WESALAPP_BC676 }}
|
# firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_WESALAPP_BC676 }}
|
||||||
channelId: live
|
# channelId: live
|
||||||
projectId: wesalapp-bc676
|
# projectId: wesalapp-bc676
|
||||||
entryPoint: frontend
|
# entryPoint: frontend
|
||||||
|
|||||||
@ -1,23 +1,23 @@
|
|||||||
# This file was auto-generated by the Firebase CLI
|
# # This file was auto-generated by the Firebase CLI
|
||||||
# https://github.com/firebase/firebase-tools
|
# # https://github.com/firebase/firebase-tools
|
||||||
|
|
||||||
name: Deploy to Firebase Hosting on PR
|
# name: Deploy to Firebase Hosting on PR
|
||||||
on: pull_request
|
# on: pull_request
|
||||||
permissions:
|
# permissions:
|
||||||
checks: write
|
# checks: write
|
||||||
contents: read
|
# contents: read
|
||||||
pull-requests: write
|
# pull-requests: write
|
||||||
jobs:
|
# jobs:
|
||||||
build_and_preview:
|
# build_and_preview:
|
||||||
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
|
# if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
|
||||||
runs-on: ubuntu-latest
|
# runs-on: ubuntu-latest
|
||||||
steps:
|
# steps:
|
||||||
- uses: actions/checkout@v4
|
# - uses: actions/checkout@v4
|
||||||
- run: flutter build web
|
# - run: flutter build web
|
||||||
working-directory: frontend
|
# working-directory: frontend
|
||||||
- uses: FirebaseExtended/action-hosting-deploy@v0
|
# - uses: FirebaseExtended/action-hosting-deploy@v0
|
||||||
with:
|
# with:
|
||||||
repoToken: ${{ secrets.GITHUB_TOKEN }}
|
# repoToken: ${{ secrets.GITHUB_TOKEN }}
|
||||||
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_WESALAPP_BC676 }}
|
# firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_WESALAPP_BC676 }}
|
||||||
projectId: wesalapp-bc676
|
# projectId: wesalapp-bc676
|
||||||
entryPoint: frontend
|
# entryPoint: frontend
|
||||||
|
|||||||
@ -10,42 +10,38 @@ class HomeScreen extends StatefulWidget {
|
|||||||
|
|
||||||
class _HomeScreenState extends State<HomeScreen> {
|
class _HomeScreenState extends State<HomeScreen> {
|
||||||
int _currentIndex = 0;
|
int _currentIndex = 0;
|
||||||
|
|
||||||
final List<Widget> _pages = [
|
final List<Widget> _pages = [FeedPage(), InvitationsPage(), ProfilePage()];
|
||||||
FeedPage(),
|
|
||||||
InvitationsPage(),
|
|
||||||
ProfilePage(),
|
|
||||||
];
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return WillPopScope(
|
||||||
body: _pages[_currentIndex],
|
onWillPop: () async {
|
||||||
bottomNavigationBar: BottomNavigationBar(
|
// Prevent going back to authentication screens
|
||||||
currentIndex: _currentIndex,
|
return false;
|
||||||
onTap: (index) {
|
},
|
||||||
setState(() {
|
child: Scaffold(
|
||||||
_currentIndex = index;
|
body: _pages[_currentIndex],
|
||||||
});
|
bottomNavigationBar: BottomNavigationBar(
|
||||||
},
|
currentIndex: _currentIndex,
|
||||||
type: BottomNavigationBarType.fixed,
|
onTap: (index) {
|
||||||
selectedItemColor: Color(0xFF6A4C93),
|
setState(() {
|
||||||
unselectedItemColor: Colors.grey,
|
_currentIndex = index;
|
||||||
items: [
|
});
|
||||||
BottomNavigationBarItem(
|
},
|
||||||
icon: Icon(Icons.home),
|
type: BottomNavigationBarType.fixed,
|
||||||
label: 'Feed',
|
selectedItemColor: Color(0xFF6A4C93),
|
||||||
),
|
unselectedItemColor: Colors.grey,
|
||||||
BottomNavigationBarItem(
|
items: [
|
||||||
icon: Icon(Icons.mail),
|
BottomNavigationBarItem(icon: Icon(Icons.home), label: 'Feed'),
|
||||||
label: 'Invitations',
|
BottomNavigationBarItem(
|
||||||
),
|
icon: Icon(Icons.mail),
|
||||||
BottomNavigationBarItem(
|
label: 'Invitations',
|
||||||
icon: Icon(Icons.person),
|
),
|
||||||
label: 'Profile',
|
BottomNavigationBarItem(icon: Icon(Icons.person), label: 'Profile'),
|
||||||
),
|
],
|
||||||
],
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user