-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #277 from COS301-SE-2024/revert-273-chore/mobile/r…
…efactor Revert "Chore/mobile/refactor"
- Loading branch information
Showing
176 changed files
with
8,837 additions
and
17,462 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Build Python App 🏗️ | ||
|
||
on: | ||
pull_request: | ||
branches: ["develop"] | ||
paths: [ | ||
"python-code/**", | ||
".github/workflows/build-python.yml" | ||
] | ||
|
||
workflow_dispatch: | ||
|
||
defaults: | ||
run: | ||
working-directory: python-code | ||
|
||
jobs: | ||
build: | ||
name: 🏗️ Build | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
python-version: [3.8, 3.9, 3.11] | ||
|
||
steps: | ||
- name: ⬇️ Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: 🏗 Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: 📦 Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
- name: ✅ Build completed | ||
run: echo "Build completed successfully!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Deploy Docs site to Live site | ||
name: Build 🏗️ and Deploy Documentation 🛳️ | ||
|
||
on: | ||
push: | ||
|
@@ -10,7 +10,8 @@ on: | |
"documentation/occupi-docs/next.config.js", | ||
"documentation/occupi-docs/package.json", | ||
"documentation/occupi-docs/theme.config.tsx", | ||
"documentation/occupi-docs/tsconfig.json" | ||
"documentation/occupi-docs/tsconfig.json", | ||
".github/workflows/deploy-docs.yml" | ||
] | ||
|
||
workflow_dispatch: | ||
|
@@ -22,44 +23,45 @@ defaults: | |
jobs: | ||
# Build job | ||
build-test: | ||
name: 🏗️ Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
- name: ⬇️ Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Bun | ||
- name: 🏗 Setup Bun | ||
uses: oven-sh/setup-bun@v1 | ||
with: | ||
bun-version: latest # or "latest", "canary", <sha> | ||
|
||
- name: Install dependencies with Bun | ||
- name: 📦 Install dependencies with Bun | ||
run: bun install | ||
|
||
- name: Build with Next.js | ||
- name: 🚀 Build with Next.js | ||
run: bun run build | ||
|
||
build-push-docker: | ||
name: Build and Push Documentation Docker Image | ||
name: 🐋 Build and Push Documentation Docker Image | ||
runs-on: ubuntu-latest | ||
needs: build-test | ||
|
||
steps: | ||
- name: Checkout code | ||
- name: ⬇️ Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up QEMU | ||
- name: 🏗 Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
- name: 🏗 Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to DockerHub | ||
- name: 🧑💻 Login to DockerHub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Build and push Docker image | ||
- name: 🐳 Build and push Docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: documentation/occupi-docs | ||
|
@@ -69,15 +71,15 @@ jobs: | |
tags: ${{ secrets.DOCKER_USERNAME }}/occupi-documentation:latest | ||
|
||
deploy: | ||
name: Deploy Documentation | ||
name: 🛳️ Deploy Documentation | ||
runs-on: ubuntu-latest | ||
needs: build-push-docker | ||
|
||
steps: | ||
- name: Checkout code | ||
- name: ⬇️ Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Copy files to VM | ||
- name: 🪷 Copy files to VM | ||
uses: appleboy/[email protected] | ||
with: | ||
host: ${{ secrets.VM_IP }} | ||
|
@@ -87,7 +89,7 @@ jobs: | |
target: "/home/${{ secrets.VM_USERNAME }}/occupi-docs" | ||
|
||
# SSH to VM and run commands | ||
- name: SSH to VM | ||
- name: 🚀 SSH to VM | ||
uses: appleboy/ssh-action@master | ||
with: | ||
host: ${{ secrets.VM_IP }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Build and Deploy Dev golang | ||
name: Build 🏗️ and Deploy Golang App 🛳️ to Develop 🚈 | ||
|
||
on: | ||
push: | ||
|
@@ -18,52 +18,52 @@ defaults: | |
|
||
jobs: | ||
build-test: | ||
name: Build | ||
name: 🏗️ Build | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
- name: ⬇️ Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Go | ||
- name: 🏗 Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: '1.21' # Specify the Go version you are using | ||
|
||
- name: Build the code | ||
- name: 🚀 Build the code | ||
run: | | ||
go build -v cmd/occupi-backend/main.go | ||
build-push-docker: | ||
name: Build and Push Develop Docker Image | ||
name: 🐋 Build and Push Develop Docker Image | ||
runs-on: ubuntu-latest | ||
needs: build-test | ||
|
||
steps: | ||
- name: Checkout code | ||
- name: ⬇️ Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up QEMU | ||
- name: 🏗 Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
- name: 🏗 Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to DockerHub | ||
- name: 🧑💻 Login to DockerHub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Decrypt default variables | ||
- name: 🔓 Decrypt default variables | ||
run: | | ||
echo "${{ secrets.GPG_PASSPHRASE }}" | gpg --quiet --batch --yes --decrypt --passphrase-fd 0 configs/config.yaml.gpg > configs/config.yaml | ||
- name: Decrypt test variables | ||
- name: 🔓 Decrypt test variables | ||
run: | | ||
echo "${{ secrets.GPG_PASSPHRASE }}" | gpg --quiet --batch --yes --decrypt --passphrase-fd 0 configs/dev.deployed.yaml.gpg > configs/dev.deployed.yaml | ||
- name: Build and push Docker image | ||
- name: 🐳 Build and push Docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: occupi-backend | ||
|
@@ -73,15 +73,15 @@ jobs: | |
tags: ${{ secrets.DOCKER_USERNAME }}/occupi-backend:latest-develop | ||
|
||
deploy: | ||
name: Deploy for Develop | ||
name: 🛳️ Deploy for Develop | ||
runs-on: ubuntu-latest | ||
needs: build-push-docker | ||
|
||
steps: | ||
- name: Checkout code | ||
- name: ⬇️ Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Copy files to VM | ||
- name: 🪷 Copy files to VM | ||
uses: appleboy/[email protected] | ||
with: | ||
host: ${{ secrets.VM_IP }} | ||
|
@@ -91,7 +91,7 @@ jobs: | |
target: "/home/${{ secrets.VM_USERNAME }}/occupi-backend-dev" | ||
|
||
# SSH to VM and run commands | ||
- name: SSH to VM | ||
- name: 🚀 SSH to VM | ||
uses: appleboy/ssh-action@master | ||
with: | ||
host: ${{ secrets.VM_IP }} | ||
|
Oops, something went wrong.