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

Merge workflow changes to staging #901

Merged
merged 4 commits into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/cd.dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches: [dev]
paths-ignore:
- "README.md"
- ".github/workflows/**"
# - ".github/workflows/**"
workflow_dispatch:

jobs:
Expand All @@ -23,10 +23,10 @@ jobs:
password: ${{ secrets.PASSWORD }}
script: |
cd hng_boilerplate_python_fastapi_web
# git add .
# git stash
# git checkout dev
# git pull origin dev
git add .
git stash
git checkout dev
git pull origin dev
source venv-dev/bin/activate
pip install -r requirements.txt
alembic upgrade head
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/cd.prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches: [main]
paths-ignore:
- "README.md"
- ".github/workflows/**"
# - ".github/workflows/**"
workflow_dispatch:

jobs:
Expand All @@ -22,9 +22,14 @@ jobs:
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
script: |
cd boilerplate-python/prod/
cd hng_boilerplate_python_fastapi_web
git add .
git stash
git checkout main
git pull origin main
source .venv/bin/activate
source venv-prod/bin/activate
pip install -r requirements.txt
alembic upgrade head
echo "${{ secrets.PASSWORD }}" | sudo -S systemctl restart python-bp-prod.service


11 changes: 8 additions & 3 deletions .github/workflows/cd.staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches: [staging]
paths-ignore:
- "README.md"
- ".github/workflows/**"
# - ".github/workflows/**"
workflow_dispatch:

jobs:
Expand All @@ -23,8 +23,13 @@ jobs:
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
script: |
cd boilerplate-python/staging/
cd hng_boilerplate_python_fastapi_web
git add .
git stash
git checkout staging
git pull origin staging
source .venv/bin/activate
source venv-staging/bin/activate
pip install -r requirements.txt
alembic upgrade head
echo "${{ secrets.PASSWORD }}" | sudo -S systemctl restart python-bp-staging.service

2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
types: [opened, synchronize, reopened]
paths-ignore:
- "README.md"
- ".github/workflows/**"
# - ".github/workflows/**"

jobs:
build-and-test:
Expand Down
Loading