Skip to content

Commit

Permalink
Add deploy step to dev server
Browse files Browse the repository at this point in the history
  • Loading branch information
pitastrudl committed Jan 7, 2025
1 parent d683095 commit 2796ea2
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/dockerbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
build-and-push:
runs-on: ubuntu-24.04
outputs:
image_sha: ${{ steps.determine-tag.outputs.image_sha }} # Output the SHA for deploy
image_sha: ${{ steps.determine-tag.outputs.image_sha }} # Output the SHA for deploy
steps:
- name: Checkout
uses: actions/[email protected]
Expand Down Expand Up @@ -60,9 +60,22 @@ jobs:
needs: build-and-push
environment: badger-servers
env:
DOCKER_TAG: ${{ needs.build-and-push.outputs.image_sha }} # Pass the SHA to deploy
DOCKER_TAG: ${{ needs.build-and-push.outputs.image_sha }} # Pass the SHA to deploy
steps:
- name: Deploy to server
- name: Deploy to dev server
uses: garygrossgarten/[email protected]
with:
command: |
cd badgehub-infra/badgehub
export BACKEND_IMAGE_TAG=${{ env.DOCKER_TAG }}
echo "BACKEND_IMAGE_TAG is: $BACKEND_IMAGE_TAG"
docker-compose -f docker-compose.yml up --no-deps -d badgehub-backend
host: ${{ secrets.DEV_HOST }}
port: ${{ secrets.DEV_PORT }}
username: ${{ secrets.DEV_USERNAME }}
passphrase: ${{ secrets.DEV_PASSPHRASE }}
privateKey: ${{ secrets.DEV_PRIVATE_KEY }}
- name: Deploy to staging server
uses: garygrossgarten/[email protected]
with:
command: |
Expand Down

0 comments on commit 2796ea2

Please sign in to comment.