Skip to content

Commit

Permalink
ci: add prod pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
soumitradev committed Aug 1, 2023
1 parent 1137b6e commit e92a10a
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ jobs:
port: ${{ secrets.PORT }}
script: |
cd /home/ubuntu/clones
cd chronofactorem-rewrite
cd chronofactorem-rewrite-staging
git reset --hard HEAD
git pull
docker compose --profile ingestion down
docker compose --profile prod down
docker compose --profile prod up --build -d
docker compose --profile prod up --build -d
27 changes: 27 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Host a new release of the API

on:
release:
types:
- published

jobs:
release:
name: Build and deploy to prod
runs-on: ubuntu-latest
steps:
- name: ssh into machine, and clone repo
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }}
script: |
cd /home/ubuntu/clones
cd chronofactorem-rewrite-prod
git reset --hard HEAD
git pull
docker compose --profile ingestion down
docker compose --profile prod down
docker compose --profile prod up --build -d

0 comments on commit e92a10a

Please sign in to comment.