Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.1.0 #89

Merged
merged 217 commits into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
217 commits
Select commit Hold shift + click to select a range
370b5af
Registration
KamogeloMoeketse Jun 2, 2024
1512341
Login
KamogeloMoeketse Jun 2, 2024
6ba1ca8
Checkin
KamogeloMoeketse Jun 2, 2024
4c84cf7
backend routing update for mobile
KamogeloMoeketse Jun 2, 2024
03f394e
Bookings
KamogeloMoeketse Jun 3, 2024
71784a6
Checkin
KamogeloMoeketse Jun 3, 2024
ee3202c
otp verification flow
KamogeloMoeketse Jun 3, 2024
5a41405
profile editing ux additions
KamogeloMoeketse Jun 3, 2024
94347a0
Minor welcome page fix
KamogeloMoeketse Jun 3, 2024
274187e
dashboarc and profile0
KamogeloMoeketse Jun 3, 2024
13d7893
Create lint-test-mobile.yml
waveyboym Jun 3, 2024
c37b60f
chore: Remove lint-test-mobile workflow
waveyboym Jun 3, 2024
094cd5c
Write unit tests. MongoDB is down
Rethakgetse-Manaka Jun 3, 2024
5e196bc
chore: Add OTPVerification screen to RootLayout and update app.json a…
u21631532 Jun 5, 2024
a112ad6
chore: Update Babel configuration for mobile app
KamogeloMoeketse Jun 5, 2024
736d452
Merge branch 'feature/biometrics' of https://github.com/COS301-SE-202…
KamogeloMoeketse Jun 5, 2024
af93b90
Merge pull request #45 from COS301-SE-2024/develop
waveyboym Jun 5, 2024
007db84
feat: Add rate limiting middleware to backend API, limiting 5 request…
waveyboym Jun 5, 2024
0c5dc37
chore: Add rate limiting middleware to backend API, limiting 5 reques…
waveyboym Jun 5, 2024
825a457
Testing is throwing, errors will fix in the morning
Rethakgetse-Manaka Jun 5, 2024
46f8e0b
chore: Update test command to include verbose output and introduced w…
waveyboym Jun 6, 2024
a4e6890
fix and feat: added rate limiting for multiple ip's and fixed linting…
waveyboym Jun 6, 2024
78692b5
fix: addressing codecov issues
waveyboym Jun 6, 2024
01cff59
Merge pull request #46 from COS301-SE-2024/feat/backend/rate-limit-api
waveyboym Jun 6, 2024
c8df14f
Update lint-test-build-golang.yml
waveyboym Jun 6, 2024
16e93c3
Update lint-test-build-golang.yml
waveyboym Jun 6, 2024
7def1a1
Merge pull request #47 from COS301-SE-2024/chore/ci-cd/actions-update
waveyboym Jun 6, 2024
5b0a455
Tests are not working so yeah
Rethakgetse-Manaka Jun 6, 2024
637fddd
login and part of register
KamogeloMoeketse Jun 7, 2024
c3ac8ef
Database.go cleaned up
Rethakgetse-Manaka Jun 7, 2024
6a27e15
Merge pull request #48 from COS301-SE-2024/feature/CheckIn-refactor
Rethakgetse-Manaka Jun 7, 2024
89b3c75
chore: fix linting, test and build errors
waveyboym Jun 7, 2024
03c88a8
Merge pull request #49 from COS301-SE-2024/chore/backend/stabilizing-…
waveyboym Jun 7, 2024
11a4962
page resizing
KamogeloMoeketse Jun 7, 2024
ad427bb
otp frontend fix
KamogeloMoeketse Jun 8, 2024
6caf399
email parsing froom signup to otp verification
KamogeloMoeketse Jun 8, 2024
57c35ce
chore: Update email body formatting and add email parameter to Format…
waveyboym Jun 8, 2024
0aa3412
Bookings.Email switched from map to array
Rethakgetse-Manaka Jun 8, 2024
7f76f95
Merge pull request #50 from COS301-SE-2024/fix/backend/email-function…
waveyboym Jun 8, 2024
93f7585
Full signup and login flow
KamogeloMoeketse Jun 8, 2024
5b20917
initial bookroom page
KamogeloMoeketse Jun 9, 2024
d164da6
All booking functionality works. Need to update Docs
Rethakgetse-Manaka Jun 9, 2024
bc5c303
Routing fixed
Rethakgetse-Manaka Jun 9, 2024
2e8e410
All linting errors are fixed.
Rethakgetse-Manaka Jun 9, 2024
2c69ff6
SendMultipleEmailsConcurrently function moved to mail.go
Rethakgetse-Manaka Jun 9, 2024
aa08b35
Merge pull request #55 from COS301-SE-2024/feat/backend/view-my-booki…
Rethakgetse-Manaka Jun 9, 2024
9764e38
OccupiID generation made
Rethakgetse-Manaka Jun 9, 2024
24c4985
Docs updated
Rethakgetse-Manaka Jun 9, 2024
ac4f794
Merge pull request #56 from COS301-SE-2024/feat/backend/view-my-booki…
Rethakgetse-Manaka Jun 9, 2024
3296d95
create booking almost complete
KamogeloMoeketse Jun 10, 2024
874b88f
minor colour change
KamogeloMoeketse Jun 10, 2024
de6d2f1
make booking complete
KamogeloMoeketse Jun 10, 2024
dcf0280
View bookings almost complete
KamogeloMoeketse Jun 10, 2024
94f4744
added selector and update mock data
KamogeloMoeketse Jun 10, 2024
f422ff8
Mockaroo Dataset
Rethakgetse-Manaka Jun 11, 2024
e4b4960
route to onboarding on initial startup
KamogeloMoeketse Jun 12, 2024
4bf2c46
chore: Remove unused Docker Compose configuration and Nginx configura…
waveyboym Jun 12, 2024
039bf50
chore: added env variables
waveyboym Jun 12, 2024
4ae2346
feat: added the "ALL" action
waveyboym Jun 12, 2024
2b39732
chore: Update GitHub Actions workflow for golang linting, testing, an…
waveyboym Jun 12, 2024
d822d1f
chore: Update Docker actions versions for QEMU and Buildx and login
waveyboym Jun 12, 2024
0c85237
chore: Update Docker actions versions and GitHub Actions workflow
waveyboym Jun 12, 2024
3d491db
chore: Update Docker actions versions and GitHub Actions workflow
waveyboym Jun 12, 2024
6961cfe
chore: Update Docker actions versions and GitHub Actions workflow
waveyboym Jun 12, 2024
8296ef0
chore: Pull latest Docker image and update environment variables
waveyboym Jun 12, 2024
b44b026
chore: Update Docker login command to use password from stdin
waveyboym Jun 12, 2024
52a954a
chore: Copy necessary files to VM and update Docker images and enviro…
waveyboym Jun 12, 2024
f344e6e
chore: Update deployment configuration for VM
waveyboym Jun 12, 2024
58f6d01
chore: Update deployment configuration for VM
waveyboym Jun 12, 2024
583e867
chore: Update deployment configuration for VM
waveyboym Jun 12, 2024
4a56dc6
chore: Update GPG passphrase decryption command in deployment workflow
waveyboym Jun 12, 2024
3d4b0e4
chore: Update Docker compose commands in deployment workflow
waveyboym Jun 12, 2024
1507489
chore: Add new screens for office details, booking receipt, and booki…
u21631532 Jun 12, 2024
2d0d425
chore: Update Docker compose commands and deployment configuration fo…
waveyboym Jun 12, 2024
f41ea8d
chore: Update deployment configuration for VM
waveyboym Jun 12, 2024
6e4f3cf
chore: Update deployment configuration for VM and Docker compose comm…
waveyboym Jun 12, 2024
1eff5af
chore: Update GPG passphrase decryption command in deployment workflow
waveyboym Jun 12, 2024
8003e35
chore: Update deployment workflow for building and pushing Docker image
waveyboym Jun 12, 2024
82ed786
chore: Update deployment workflow and Docker compose configuration fo…
waveyboym Jun 12, 2024
74cbfe0
chore: Update deployment workflow and Docker compose configuration fo…
waveyboym Jun 12, 2024
d42f0b9
chore: Update Docker image tag in docker-compose.dev.yml
waveyboym Jun 12, 2024
f776ec6
chore: Remove unnecessary line in deployment workflow
waveyboym Jun 12, 2024
c96bee6
chore: Update deployment workflow to include SSH step for VM
waveyboym Jun 12, 2024
32c50e0
chore: Update deployment workflow and Docker compose configuration fo…
waveyboym Jun 12, 2024
d4286fc
chore: Update Docker image tag in docker-compose.dev.yml
waveyboym Jun 12, 2024
1e53c6b
chore: Update Docker image tag and file path in deploy-golang-develop…
waveyboym Jun 12, 2024
d7faa4d
chore: Update Docker image tag and file path in deploy-golang-develop…
waveyboym Jun 12, 2024
a789f4f
chore: Update Docker image tag and file path in deploy-golang-develop…
waveyboym Jun 12, 2024
3fe179d
chore: Update Docker image tag and file path in deploy-golang-develop…
waveyboym Jun 12, 2024
9226321
chore: Update Docker image tag and file path in deploy-golang-develop…
waveyboym Jun 12, 2024
833498e
chore: Update Docker image tag and file path in deploy-golang-develop…
waveyboym Jun 12, 2024
8e5333d
chore: Update Docker image tag and file path in deploy-golang-develop…
waveyboym Jun 12, 2024
e4b0a44
chore: Update Docker image tag and file path in deploy-golang-develop…
waveyboym Jun 12, 2024
0dff42d
chore: Update Docker image tag and file path in deploy-golang-develop…
waveyboym Jun 12, 2024
1d04243
mobile pages put together
KamogeloMoeketse Jun 13, 2024
004d0c4
chore: Update Docker image tag and file path in deploy-golang-develop…
waveyboym Jun 13, 2024
96faf1f
chore: Update Docker image tag and file path in deploy-golang-develop…
waveyboym Jun 13, 2024
5244476
chore: Update Docker image tag and file path in deploy-golang-develop…
waveyboym Jun 14, 2024
09f795b
Update certificate and key file paths in main.go and config.go
waveyboym Jun 14, 2024
2e22801
Merge branch 'develop' into feat/mobile-frontend/booking
KamogeloMoeketse Jun 15, 2024
dd62f30
removed unecessary babel file
KamogeloMoeketse Jun 15, 2024
9127814
Merge pull request #58 from COS301-SE-2024/feat/mobile-frontend/booking
KamogeloMoeketse Jun 15, 2024
6be1f29
Merge branch 'develop' of https://github.com/COS301-SE-2024/occupi in…
Rethakgetse-Manaka Jun 16, 2024
897eced
Can get all rooms available to book
Rethakgetse-Manaka Jun 16, 2024
7608c31
Limited results to 10 results
Rethakgetse-Manaka Jun 16, 2024
cca12a5
Need to write tests
Rethakgetse-Manaka Jun 16, 2024
21a37fd
Dependencies included in go.mod and go.sum
Rethakgetse-Manaka Jun 16, 2024
92d2909
Merge pull request #59 from COS301-SE-2024/feat/backend/View-availabl…
Rethakgetse-Manaka Jun 16, 2024
5f64e39
Update certificate and key file paths in main.go and config.go
waveyboym Jun 16, 2024
01e28bd
chore: Update Docker image tag and file path in deploy-golang-develop…
waveyboym Jun 16, 2024
68eb0f0
chore: Update Docker image tag and file path in deploy-golang-develop…
waveyboym Jun 16, 2024
7c1a6db
Merge pull request #60 from COS301-SE-2024/feat/backend/deployment-an…
waveyboym Jun 16, 2024
a73e662
chore: Update TLS configuration in main.go to use certificate and key…
waveyboym Jun 16, 2024
69fb9bd
chore: Update GitHub Actions workflow to exclude specific paths
waveyboym Jun 16, 2024
f9b66fe
Merge pull request #61 from COS301-SE-2024/feat/actions/adding-env-va…
waveyboym Jun 16, 2024
d37236d
chore: Update Docker image tag and file path in deploy-golang-develop…
waveyboym Jun 16, 2024
e74faf0
Merge pull request #62 from COS301-SE-2024/feat/documentation/contain…
waveyboym Jun 16, 2024
8116d55
chore: Update next.config.js for documentation deployment
waveyboym Jun 16, 2024
0d86c70
Merge pull request #63 from COS301-SE-2024/feat/documentation/contain…
waveyboym Jun 16, 2024
709ab4d
Update package.json
waveyboym Jun 16, 2024
57a5a1a
Update next.config.js
waveyboym Jun 16, 2024
eb7ef03
Update next.config.js
waveyboym Jun 16, 2024
f852f47
Update package.json
waveyboym Jun 16, 2024
498d2d2
Update package.json
waveyboym Jun 16, 2024
95a9154
Update next.config.js
waveyboym Jun 16, 2024
0fc8229
Update next.config.js
waveyboym Jun 16, 2024
994b576
Update package.json
waveyboym Jun 16, 2024
bb9784e
Update next.config.js
waveyboym Jun 16, 2024
8f14437
Update next.config.js
waveyboym Jun 16, 2024
21aacdd
another one I guess
KamogeloMoeketse Jun 16, 2024
251b03c
mobile v4
KamogeloMoeketse Jun 16, 2024
c0dc1b6
Merge pull request #64 from COS301-SE-2024/fix/mobile/exporouting
KamogeloMoeketse Jun 16, 2024
54184ed
Update next.config.js
waveyboym Jun 16, 2024
6bacb79
added linter
KamogeloMoeketse Jun 17, 2024
ea654e0
Merge pull request #65 from COS301-SE-2024/fix/mobile/exporouting
KamogeloMoeketse Jun 17, 2024
b59853c
removed unecessary folders
KamogeloMoeketse Jun 17, 2024
b41cd8c
updated readme profiles
waveyboym Jun 17, 2024
6b43d7e
Update README.md
waveyboym Jun 17, 2024
ac774d8
chore: updated release all action
waveyboym Jun 17, 2024
60e46f9
Merge pull request #66 from COS301-SE-2024/chore/documentation/updati…
waveyboym Jun 17, 2024
4f73f06
replaced local backend with deployed backend
KamogeloMoeketse Jun 17, 2024
534b2b3
added my bookingdetails
KamogeloMoeketse Jun 17, 2024
0ebcea2
reduced linting errors and warnings
KamogeloMoeketse Jun 17, 2024
74e531b
backend temporary auth fix
KamogeloMoeketse Jun 17, 2024
cebe72d
View-Rooms fixed
Rethakgetse-Manaka Jun 17, 2024
de0e20f
feat: auth logic introduced with backend session management
waveyboym Jun 17, 2024
479b824
chore: Add ping handlers for authenticated and admin routes and addit…
waveyboym Jun 17, 2024
59439a7
chore: Add UnAuthorizedCode constant and update test coverage command…
waveyboym Jun 17, 2024
ae2eea8
Merge pull request #69 from COS301-SE-2024/fix/backend/session-manage…
waveyboym Jun 17, 2024
064cc6d
backend
KamogeloMoeketse Jun 19, 2024
c4ded55
Merge branch 'develop' into feat/mobile-integration/booking
KamogeloMoeketse Jun 19, 2024
0984420
chore: Add some more edge cases to session management for users login…
waveyboym Jun 19, 2024
cf246e5
Merge pull request #71 from COS301-SE-2024/fix/backend/logout-session…
waveyboym Jun 19, 2024
e81356b
Fix implemented
Rethakgetse-Manaka Jun 20, 2024
5614db6
Merge pull request #73 from COS301-SE-2024/fix/backend/View-Rooms
Rethakgetse-Manaka Jun 20, 2024
f51868e
feat: Remove unused files and update dependencies
waveyboym Jun 20, 2024
f657ae0
Merge pull request #74 from COS301-SE-2024/feat/frontend/containerizi…
waveyboym Jun 20, 2024
c95bdfc
office details page complete
KamogeloMoeketse Jun 20, 2024
3491250
booking details
KamogeloMoeketse Jun 20, 2024
7a53b15
Room model
Rethakgetse-Manaka Jun 20, 2024
c042f22
Merge pull request #75 from COS301-SE-2024/fix/backend/View-Rooms(Des…
Rethakgetse-Manaka Jun 20, 2024
b98d2aa
chore: Update Dockerfile and next.config.js for frontend/occupi
waveyboym Jun 20, 2024
a634a4c
Update api-documentation.mdx
waveyboym Jun 20, 2024
9fc0c1d
view all rooms integration complete
KamogeloMoeketse Jun 20, 2024
1e3420d
Merge pull request #76 from COS301-SE-2024/feat/frontend/containerizi…
waveyboym Jun 20, 2024
0c8786b
booking details integration
KamogeloMoeketse Jun 20, 2024
7b05029
added slot picker
KamogeloMoeketse Jun 21, 2024
0bd95ba
chore: Refactor BookRoom component and handle network errors in useEf…
u21631532 Jun 21, 2024
444b5be
chore: Add biometric authentication for booking confirmation
u21631532 Jun 21, 2024
7eeadf5
chore: Improve biometric authentication for booking confirmation
u21631532 Jun 21, 2024
81c6763
chore: Add Face ID and Touch ID support for booking confirmation
u21631532 Jun 21, 2024
849efc3
chore: Improve biometric authentication for booking confirmation
u21631532 Jun 21, 2024
b931b35
create booking integration
KamogeloMoeketse Jun 21, 2024
09b1545
Restructing models in backend
Rethakgetse-Manaka Jun 21, 2024
70f2f26
Booking model uodated
Rethakgetse-Manaka Jun 21, 2024
de0c790
Unit test written for the OccupiID generator function in the utils.go…
Rethakgetse-Manaka Jun 21, 2024
ceac9e4
Unit test for the OccupiID generator
Rethakgetse-Manaka Jun 21, 2024
8d56c9c
All units test have been written
Rethakgetse-Manaka Jun 21, 2024
4092a0a
View Bookings get parameters acceptable
Rethakgetse-Manaka Jun 21, 2024
8503430
Can handle paarameters in get
Rethakgetse-Manaka Jun 21, 2024
7ef7c04
Merge pull request #77 from COS301-SE-2024/fix/backend/BookRoom(Occup…
Rethakgetse-Manaka Jun 21, 2024
a7eb2d1
Routes protected
Rethakgetse-Manaka Jun 21, 2024
c1683d7
Merge pull request #78 from COS301-SE-2024/fix/backend/BookRoom(Occup…
Rethakgetse-Manaka Jun 21, 2024
57aa7f3
View my bookings
KamogeloMoeketse Jun 21, 2024
68da79e
adding checkin components
KamogeloMoeketse Jun 21, 2024
481cecd
Merge branch 'develop' into feat/mobile-integration/booking
KamogeloMoeketse Jun 21, 2024
02cbb30
e2e testing zipped file called Maestro
u21631532 Jun 21, 2024
bca3c72
Merge branch 'feat/mobile-integration/booking' of https://github.com/…
u21631532 Jun 21, 2024
fbae8c9
Checkin, view, cancel buttons
KamogeloMoeketse Jun 21, 2024
2bee34b
Merge branch 'feat/mobile-integration/booking' of https://github.com/…
KamogeloMoeketse Jun 21, 2024
d23e629
Test pass
Rethakgetse-Manaka Jun 22, 2024
b28eb96
Adding ticket
KamogeloMoeketse Jun 22, 2024
37d33ca
chore: increasing codecov percentage
waveyboym Jun 22, 2024
fa1075c
chore: correcting spelling error for middleware test function
waveyboym Jun 22, 2024
4d4a507
Merge pull request #79 from COS301-SE-2024/chore/backend/adding-codec…
waveyboym Jun 22, 2024
aabaee6
Check in and booking fixed
Rethakgetse-Manaka Jun 23, 2024
2811dfe
Validator included to book room
Rethakgetse-Manaka Jun 23, 2024
a5ea10b
Merge pull request #80 from COS301-SE-2024/fix/backend/Check-in
Rethakgetse-Manaka Jun 23, 2024
434d3a9
Fixed BookRoom
Rethakgetse-Manaka Jun 23, 2024
f176f41
Merge pull request #82 from COS301-SE-2024/fix/backend/BookRoom
Rethakgetse-Manaka Jun 23, 2024
a6a08ae
Tests passing
Rethakgetse-Manaka Jun 23, 2024
341a02c
Removed middleware function
Rethakgetse-Manaka Jun 23, 2024
00e1102
Merge pull request #83 from COS301-SE-2024/test/backend/unit-testing-…
Rethakgetse-Manaka Jun 23, 2024
b597c5c
All possible tests were written and pass
Rethakgetse-Manaka Jun 23, 2024
5be1b44
Merge pull request #84 from COS301-SE-2024/test/backend/unit-testing-…
Rethakgetse-Manaka Jun 23, 2024
b143a21
FULLY INTEGRATED
KamogeloMoeketse Jun 24, 2024
cd8241a
reverted backend changes
KamogeloMoeketse Jun 24, 2024
b6c2fc1
hotfix
KamogeloMoeketse Jun 24, 2024
34c7ce0
Merge pull request #85 from COS301-SE-2024/feat/mobile-integration/bo…
KamogeloMoeketse Jun 24, 2024
0488638
chore: Remove unused mobile test workflow
waveyboym Jun 24, 2024
fb952ba
chore: Update npm test command to run tests without CI flag
waveyboym Jun 24, 2024
5649409
Merge pull request #87 from COS301-SE-2024/feat/actions/mobile-lint-test
waveyboym Jun 24, 2024
9ee4655
Linting errors solved
KamogeloMoeketse Jun 24, 2024
9ae5652
linting error
KamogeloMoeketse Jun 24, 2024
175b2e7
linter exit
KamogeloMoeketse Jun 24, 2024
74021a5
Merge pull request #88 from COS301-SE-2024/fix/mobile/linting-errors
KamogeloMoeketse Jun 24, 2024
47040d8
Update README.md
waveyboym Jun 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
153 changes: 153 additions & 0 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
name: Build and Release all

on:
push:
branches:
- action-needs-refinement-lol

jobs:
build-backend-binary:
name: Build Backend Binary
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.16'

- name: Build Backend Binary
run: |
go build -o occupi-backend ./occupi-backend/cmd/occupi-backend/main.go

- name: Archive Backend Binary
run: |
mkdir -p dist
mv occupi-backend/occupi-backend dist/occupi-backend
zip -r dist/occupi-backend.zip dist/occupi-backend

- name: Upload Backend Binary
uses: actions/upload-artifact@v2
with:
name: occupi-backend
path: dist/occupi-backend.zip


build-expo-app:
name: Build Expo App for Android and iOS
runs-on: [ubuntu-latest, macos-latest]
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '20'

- name: Install Expo CLI
run: |
npm install -g expo-cli

- name: Install Expo dependencies
run: |
cd occupi-frontend
npm install

- name: Build Expo App for native platforms
run: |
cd occupi-frontend/occupi-mobile
expo build

- name: Archive Expo App for Android and iOS
run: |
mkdir -p dist
mv occupi-frontend/occupi-mobile/dist dist/occupi-mobile
zip -r dist/occupi-mobile.zip dist/occupi-mobile

- name: Upload Expo App for Android and iOS
uses: actions/upload-artifact@v2
with:
name: occupi-mobile
path: dist/occupi-backend.zip

build-vite-app:
name: Build Vite App
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '14'

- name: Install Vite
run: |
npm install -g create-vite

- name: Install Vite dependencies
run: |
cd occupi-frontend
npm install

- name: Build Vite App
run: |
cd occupi-frontend
npm run build

build-tauri-app:
name: Build Tauri App
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Rust
uses: actions/setup-rust@v1
with:
rust-version: '1.53.0'

- name: Install Tauri
run: |
cargo install tauri-bundler --force

- name: Build Tauri App
run: |
cd occupi-frontend
tauri build

release:
name: Release
runs-on: ubuntu-latest
needs: [build-backend-binary, build-expo-app, build-vite-app, build-tauri-app]
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '14'

- name: Install GitHub CLI
run: |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key C99B11DEB97541F0
sudo apt-add-repository https://cli.github.com/packages
sudo apt update
sudo apt install gh

- name: Login to GitHub
run: |
gh auth login

- name: Create a Release
run: |
gh release create v1.0.0 -t "v1.0.0" -n "v1.0.0" ./occupi-backend/occupi-backend ./occupi-frontend/occupi-frontend ./occupi-frontend/dist ./occupi-frontend/build ./occupi-frontend/target/release/occupi-frontend

- name: Upload Release Assets
run: |
gh release upload v1.0.0 ./occupi-backend/occupi-backend ./occupi-frontend/occupi-frontend ./occupi-frontend/dist ./occupi-frontend/build ./occupi-frontend/target/release/occupi-frontend
93 changes: 60 additions & 33 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy Docs site to Pages
name: Deploy Docs site to Live site

on:
push:
Expand All @@ -21,7 +21,7 @@ defaults:

jobs:
# Build job
build:
build-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -32,43 +32,70 @@ jobs:
with:
bun-version: latest # or "latest", "canary", <sha>

- name: Setup Pages
uses: actions/configure-pages@v4
with:
# Automatically inject basePath in your Next.js configuration file and disable
# server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized).
#
# You may remove this line if you want to manage the configuration yourself.
static_site_generator: next

- name: Install dependencies with Bun
run: bun install

- name: Build with Next.js
run: bun run build
run: bun run build

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: documentation/occupi-docs/out
build-push-docker:
name: Build and Push Documentation Docker Image
runs-on: ubuntu-latest
needs: build-test

# Deployment job
deploy:
name: Deploy to GitHub Pages
needs: build
steps:
- name: Checkout code
uses: actions/checkout@v4

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: documentation/occupi-docs
file: documentation/occupi-docs/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ secrets.DOCKER_USERNAME }}/occupi-documentation:latest

deploy:
name: Deploy Documentation
runs-on: ubuntu-latest
needs: build-push-docker

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Copy files to VM
uses: appleboy/[email protected]
with:
host: ${{ secrets.VM_IP }}
username: ${{ secrets.VM_USERNAME }}
key: ${{ secrets.VM_SSH_KEY }}
source: "documentation/occupi-docs/docker-compose.yml,documentation/occupi-docs/Dockerfile"
target: "/home/${{ secrets.VM_USERNAME }}/occupi-docs"

# SSH to VM and run commands
- name: SSH to VM
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.VM_IP }}
username: ${{ secrets.VM_USERNAME }}
key: ${{ secrets.VM_SSH_KEY }}
script: |
cd /home/${{ secrets.VM_USERNAME }}/occupi-docs/documentation/occupi-docs
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
DOCKER_USERNAME=${{ secrets.DOCKER_USERNAME }} docker compose -f docker-compose.yml down
DOCKER_USERNAME=${{ secrets.DOCKER_USERNAME }} docker compose -f docker-compose.yml pull
DOCKER_USERNAME=${{ secrets.DOCKER_USERNAME }} docker compose -f docker-compose.yml up -d
Loading