-
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 #273 from COS301-SE-2024/chore/mobile/refactor
Chore/mobile/refactor
- Loading branch information
Showing
177 changed files
with
17,495 additions
and
8,831 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 was deleted.
Oops, something went wrong.
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 Documentation 🛳️ | ||
name: Deploy Docs site to Live site | ||
|
||
on: | ||
push: | ||
|
@@ -10,8 +10,7 @@ on: | |
"documentation/occupi-docs/next.config.js", | ||
"documentation/occupi-docs/package.json", | ||
"documentation/occupi-docs/theme.config.tsx", | ||
"documentation/occupi-docs/tsconfig.json", | ||
".github/workflows/deploy-docs.yml" | ||
"documentation/occupi-docs/tsconfig.json" | ||
] | ||
|
||
workflow_dispatch: | ||
|
@@ -23,45 +22,44 @@ 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 | ||
|
@@ -71,15 +69,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 }} | ||
|
@@ -89,7 +87,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 Golang App 🛳️ to Develop 🚈 | ||
name: Build and Deploy Dev golang | ||
|
||
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.