Skip to content

Commit

Permalink
Merge pull request #67 from crux-bphc/add-prod-pipeline
Browse files Browse the repository at this point in the history
Add prod pipeline
  • Loading branch information
soumitradev authored Aug 1, 2023
2 parents 206b842 + e92a10a commit ba3992a
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 ba3992a

Please sign in to comment.