Skip to content

Commit

Permalink
Merge pull request #894 from hngprojects/newci-devops
Browse files Browse the repository at this point in the history
new ci workflow
  • Loading branch information
laraadeboye authored Aug 15, 2024
2 parents 26437ee + 5ce054a commit 40b9884
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 212 deletions.
19 changes: 7 additions & 12 deletions .github/workflows/cd.dev.yml.bac → .github/workflows/cd.dev.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
name: Dev Branch Deployment

on:
workflow_run:
workflows: ["CI"]
types:
- completed
push:
branches: [dev]
paths-ignore:
- "README.md"
- ".github/workflows/**"
workflow_dispatch:

jobs:
on-success:
deploy:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand All @@ -22,14 +22,9 @@ jobs:
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
script: |
cd python/dev_source_code/
cd boilerplate-python/dev/
git pull origin dev
source .venv/bin/activate
pip install -r requirements.txt
alembic upgrade head
on-failure:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
steps:
- run: echo 'The triggering workflow failed'
40 changes: 0 additions & 40 deletions .github/workflows/cd.dev.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
name: Prod Branch Deployment

on:
workflow_run:
workflows: ["CI"]
types:
- completed
push:
branches: [main]
paths-ignore:
- "README.md"
- ".github/workflows/**"
workflow_dispatch:

jobs:
on-success:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand All @@ -22,14 +22,9 @@ jobs:
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
script: |
cd python/prod_source_code/
cd boilerplate-python/prod/
git pull origin main
source .venv/bin/activate
pip install -r requirements.txt
alembic upgrade head
on-failure:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
steps:
- run: echo 'The triggering workflow failed'
39 changes: 0 additions & 39 deletions .github/workflows/cd.prod.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
name: Staging Branch Deployment

on:
workflow_run:
workflows: ["CI"]
types:
- completed
push:
branches: [staging]
paths-ignore:
- "README.md"
- ".github/workflows/**"
workflow_dispatch:

jobs:
on-success:
Expand All @@ -22,14 +23,8 @@ jobs:
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
script: |
cd python/staging_source_code/
cd boilerplate-python/staging/
git pull origin staging
source .venv/bin/activate
pip install -r requirements.txt
alembic upgrade head

on-failure:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
steps:
- run: echo 'The triggering workflow failed'
39 changes: 0 additions & 39 deletions .github/workflows/cd.staging.yml

This file was deleted.

9 changes: 2 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
name: CI

on:
push:
branches: [main, staging, dev, devops-main]
paths-ignore:
- "README.md"
- ".github/workflows/**"
pull_request:
branches: [main, staging, dev, devops-main]
types: [opened, synchronize, reopened]
paths-ignore:
- "README.md"
- ".github/workflows/**"
Expand All @@ -28,7 +23,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
Expand Down
File renamed without changes.
53 changes: 0 additions & 53 deletions .github/workflows/test.yml.bac

This file was deleted.

0 comments on commit 40b9884

Please sign in to comment.