Skip to content

Commit

Permalink
testing deployment fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cassidyxu committed Nov 25, 2024
1 parent f4162be commit d63f7f3
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main
- expired-contract-microservice
pull_request:
branches:
- main
Expand All @@ -23,24 +24,24 @@ jobs:
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Get SHA
id: vars
run: echo "::set-output name=sha_short::$(git rev-parse --short main)"
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- name: Docker Build & Push
uses: docker/build-push-action@v2
with:
context: ./
file: ./Dockerfile
push: true
tags: cornellappdev/all-in:${{ steps.vars.outputs.sha_short }}
tags: cornellappdev/all-in:${{ env.sha_short }}
- name: Remote SSH and Deploy
uses: appleboy/ssh-action@master
env:
IMAGE_TAG: ${{ steps.vars.outputs.sha_short }}
IMAGE_TAG: ${{ env.sha_short }}
with:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USERNAME }}
key: ${{ secrets.SERVER_KEY }}
script: |
export IMAGE_TAG=${{ steps.vars.outputs.sha_short }}
export IMAGE_TAG=${{ env.sha_short }}
cd docker-compose
docker stack rm thestack
sleep 20s
Expand Down

0 comments on commit d63f7f3

Please sign in to comment.