Skip to content

Commit

Permalink
aws
Browse files Browse the repository at this point in the history
  • Loading branch information
Zafei-Erin committed Feb 21, 2024
1 parent 2d963d9 commit 71c6670
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions .github/workflows/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
types: [labeled]

jobs:
deploy-aws:
deploy-git:
if: "${{ github.event.label.name == 'prod: backend' }}"
runs-on: ubuntu-latest

Expand All @@ -17,11 +17,19 @@ jobs:
uses: actions-ecosystem/action-remove-labels@v1
with:
labels: "prod: backend"

# - name: Deploy to EC2 instance
# runs-on: aws-nft
# run: sudo docker-compose stop
# run: sudo docker-compose rm -f
# run: sudo docker-compose pull
# run: sudo docker-compose up -d
# run: sudo docker image prune -af

deploy-aws:
needs: build
runs-on: aws-nft

steps:
- name: stop old image
run: sudo docker-compose stop
- name: remove old image
run: sudo docker-compose rm -f
- name: pull new image
run: sudo docker-compose pull
- name: run new image
run: sudo docker-compose up -d
- name: prune images
run: sudo docker image prune -af

0 comments on commit 71c6670

Please sign in to comment.