Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
devsisingh committed Jan 23, 2024
2 parents 93a8271 + cd49e6b commit 7fb1118
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: "Build and Push to GHCR"
on:
push:
branches:
- main
- prod

jobs:
build_push:
Expand Down Expand Up @@ -41,8 +41,8 @@ jobs:
needs: build_push
runs-on: ubuntu-latest
steps:
- name: Deploy on DEV server
if: github.ref == 'refs/heads/main'
- name: Deploy on PROD server
if: github.ref == 'refs/heads/prod'
uses: appleboy/ssh-action@v0.1.7
with:
host: ${{ secrets.PROD_REMOTE_SERVER_ADDRESS }}
Expand All @@ -51,7 +51,7 @@ jobs:
port: ${{ secrets.PROD_SSH_PORT }}
script: |
pwd
docker stop erebrus-frontend || true && docker image rm ghcr.io/netsepio/erebrus-frontend:main
docker stop erebrus-frontend || true && docker image rm ghcr.io/netsepio/erebrus-frontend:prod
echo ${{ secrets.GHCR_TOKEN }} | docker login ghcr.io -u ${{ secrets.GHCR_USERNAME }} --password-stdin
docker pull ghcr.io/netsepio/erebrus-frontend:main
docker pull ghcr.io/netsepio/erebrus-frontend:prod
docker run --name="erebrus-frontend" --rm -p 4040:8080 --net=bridge -d ghcr.io/netsepio/erebrus-frontend:main

0 comments on commit 7fb1118

Please sign in to comment.