-
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.
chore(workflow): update deployement workflow. (#14)
* modified: .gitignore * chore: update workflow. * fix: flake8 error. * fix: last mistake
- Loading branch information
1 parent
ebe52be
commit 9f748b6
Showing
5 changed files
with
23 additions
and
18 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 |
---|---|---|
@@ -1,31 +1,35 @@ | ||
name: Deployment | ||
|
||
on: | ||
workflow_call: | ||
push: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- '.github/**' | ||
- '.vscode/**' | ||
- ".github/**" | ||
- ".vscode/**" | ||
|
||
env: | ||
MARIADB_ROOT_PASSWORD: ${{ secrets.MARIADB_ROOT_PASSWORD }} | ||
DATABASE_PASSWORD: ${{ secrets.DATABASE_PASSWORD }} | ||
DATABASE_USERNAME: ${{ secrets.DATABASE_USERNAME }} | ||
SECRET_KEY: ${{ secrets.SECRET_KEY }} | ||
ONISEP_EMAIL: ${{ secrets.ONISEP_EMAIL }} | ||
ONISEP_PASSWORD: ${{ secrets.ONISEP_PASSWORD }} | ||
ONISEP_APP_ID: ${{ secrets.ONISEP_APP_ID }} | ||
|
||
jobs: | ||
build: | ||
runs-on: self-hosted | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: Stop running Docker container | ||
run: docker stop api | ||
- name: remove container | ||
run: docker rm api | ||
- name: Remove previous Docker image | ||
run: docker rmi onisep_api-api:latest | ||
- name: Build and Run Docker container | ||
run: docker-compose up -d | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: Stop running Docker container | ||
run: docker stop api | ||
- name: remove container | ||
run: docker rm api | ||
- name: Remove previous Docker image | ||
run: docker rmi onisep_api-api:latest | ||
- name: Build and Run Docker container | ||
run: docker-compose up -d |
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 |
---|---|---|
|
@@ -11,4 +11,7 @@ __pycache__/ | |
.env | ||
|
||
#Ignore db local file | ||
*.db | ||
*.db | ||
|
||
# Ignore Bruno directory for now | ||
/Onisep |
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
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,5 +1,3 @@ | ||
from dataclasses import dataclass | ||
from typing import Optional | ||
import uuid | ||
|
||
from sqlalchemy import Text | ||
|