generated from amosproj/amos202Xss0Y-projname
-
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.
Started working on github actions (#47)
- Loading branch information
Showing
6 changed files
with
143 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Backend - Tests | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- sprint-release | ||
- main | ||
paths: | ||
- "backend/**" | ||
push: | ||
branches: | ||
- sprint-release | ||
- main | ||
paths: | ||
- "backend/**" | ||
|
||
jobs: | ||
linting: | ||
name: Check linting | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Echo Linting | ||
run: echo "linting" | ||
|
||
tests: | ||
needs: linting | ||
name: Run Tests | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Echo Test | ||
run: echo "test" |
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,27 @@ | ||
name: Build Docker Compose | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- sprint-release | ||
- main | ||
paths: | ||
- "backend/**" | ||
- "frontend/**" | ||
push: | ||
branches: | ||
- sprint-release | ||
- main | ||
paths: | ||
- "backend/**" | ||
- "frontend/**" | ||
|
||
jobs: | ||
build: | ||
name: Build the Docker Image | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Build Image | ||
run: docker compose build --pull |
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,39 @@ | ||
name: Deploy Test Service | ||
|
||
on: | ||
push: | ||
branches: | ||
- sprint-release | ||
|
||
jobs: | ||
publish: | ||
name: Publish Docker Image | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Login | ||
run: | | ||
echo ${{secrets.PAT}} | docker login ghcr.io -u ${{github.actor}} --password-stdin | ||
- name: Build and Publish | ||
run: | | ||
docker compose build --pull | ||
docker-compose push | ||
- name: Logout | ||
run: docker logout | ||
|
||
deploy: | ||
needs: publish | ||
name: Deploy Image on the Server | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Install SSH keys | ||
run: | | ||
install -m 600 -D /dev/null ~/.ssh/id_rsa | ||
echo "${{secrets.TEST_ENV_SSH_PRIVATE_KEY}}" > ~/.ssh/id_rsa | ||
ssh-keyscan -H ${{secrets.TEST_ENV_SSH_HOST}} > ~/.ssh/known_hosts | ||
- name: Connect and Pull | ||
run: ssh ${{secrets.TEST_ENV_SSH_USER}}@${{secrets.TEST_ENV_SSH_HOST}} "cd /var/lib/bie && docker compose pull && docker compose up -d && exit" | ||
- name: Cleanup | ||
run: rm -rf ~/.ssh |
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,33 @@ | ||
name: Frontend - Tests | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- sprint-release | ||
- main | ||
paths: | ||
- "frontend/**" | ||
push: | ||
branches: | ||
- sprint-release | ||
- main | ||
paths: | ||
- "frontend/**" | ||
|
||
jobs: | ||
linting: | ||
name: Check linting | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Echo Linting | ||
run: echo "linting" | ||
|
||
tests: | ||
needs: linting | ||
name: Run Tests | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Echo Test | ||
run: echo "test" |
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,7 +1,7 @@ | ||
import './App.css' | ||
import "./App.css"; | ||
|
||
function App() { | ||
return <h1> Building Information Enhancer</h1>; | ||
return <h1> Building Information Enhancer v.2</h1>; | ||
} | ||
|
||
export default App | ||
export default App; |