Skip to content

Commit

Permalink
Fix prod ci workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
leandrodamasio committed Jul 17, 2023
1 parent f8a1345 commit 45a3253
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ jobs:
build:
runs-on: ubuntu-latest
steps:

- name: Create ssh key
uses: actions/checkout@v3
shell: bash
env:
SSH_PRIVATE_KEY: ${{secrets.SSH_PRIVATE_KEY}}
Expand All @@ -19,6 +19,8 @@ jobs:
echo "$SSH_PRIVATE_KEY" > ../private.key
sudo chmod 600 ../private.key
echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
- uses: actions/checkout@v3
- name: Copy file via ssh key
uses: appleboy/[email protected]
with:
Expand All @@ -28,6 +30,7 @@ jobs:
port: ${{ secrets.PORT }}
source: "README.md,LICENSE,main.c,.gitignore,.github,docker-compose.yml,frontends,backends"
target: ~/apps/rbs/src

- name: Executing docker-compose remote script
uses: appleboy/ssh-action@master
with:
Expand All @@ -37,5 +40,5 @@ jobs:
key: ${{ secrets.SSH_PRIVATE_KEY }}
script: |
cd ~/apps/rbs/src"
docker-compose up -d --build
sudo docker-compose up -d --build
echo "Deploy finalizado"

0 comments on commit 45a3253

Please sign in to comment.