-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #67 from crux-bphc/add-prod-pipeline
Add prod pipeline
- Loading branch information
Showing
2 changed files
with
29 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |