diff --git a/.github/workflows/cd.dev.yaml b/.github/workflows/cd.dev.yaml index 548623358..bc75d76d4 100644 --- a/.github/workflows/cd.dev.yaml +++ b/.github/workflows/cd.dev.yaml @@ -5,7 +5,7 @@ on: branches: [dev] paths-ignore: - "README.md" - - ".github/workflows/**" + # - ".github/workflows/**" workflow_dispatch: jobs: @@ -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 diff --git a/.github/workflows/cd.prod.yaml b/.github/workflows/cd.prod.yaml index f65f90954..c086be51a 100644 --- a/.github/workflows/cd.prod.yaml +++ b/.github/workflows/cd.prod.yaml @@ -5,7 +5,7 @@ on: branches: [main] paths-ignore: - "README.md" - - ".github/workflows/**" + # - ".github/workflows/**" workflow_dispatch: jobs: @@ -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 + diff --git a/.github/workflows/cd.staging.yaml b/.github/workflows/cd.staging.yaml index 5138accb7..a05b951f1 100644 --- a/.github/workflows/cd.staging.yaml +++ b/.github/workflows/cd.staging.yaml @@ -5,7 +5,7 @@ on: branches: [staging] paths-ignore: - "README.md" - - ".github/workflows/**" + # - ".github/workflows/**" workflow_dispatch: jobs: @@ -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 + diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3b86b3f40..8e411f417 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,7 +5,7 @@ on: types: [opened, synchronize, reopened] paths-ignore: - "README.md" - - ".github/workflows/**" + # - ".github/workflows/**" jobs: build-and-test: