Skip to content

Commit 15b7fb3

Browse files
authored
Merge pull request #40 from crux-bphc/ci/setup-staging-workflow
ci: add workflow to deploy to staging manually
2 parents 3d8a4e8 + e557c73 commit 15b7fb3

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

.github/workflows/staging.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Host a staging instance of Rideshare Backend
2+
3+
on: workflow_dispatch
4+
5+
jobs:
6+
staging:
7+
name: Build and deploy to staging
8+
runs-on: self-hosted
9+
steps:
10+
- name: Pull latest code and deploy with Docker
11+
run: |
12+
cd /home/ubuntu/clones/rideshare-backend-dev
13+
git reset --hard HEAD
14+
GIT_SSH_COMMAND="ssh -i /home/ubuntu/.ssh/gh-actions -o IdentitiesOnly=yes" git pull
15+
docker compose --profile staging down
16+
docker compose --profile staging up --build -d

0 commit comments

Comments
 (0)