Skip to content

Commit

Permalink
Update deploy-prod.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
p-shubh authored Jun 26, 2024
1 parent bab9e73 commit d929859
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,17 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- name: SRV_1
address: ${{ secrets.PROD_REMOTE_SERVER_ADDRESS_SRV_1 }}
- name: SRV_2
address: ${{ secrets.PROD_REMOTE_SERVER_ADDRESS_SRV_2 }}
server: [ "SRV_1", "SRV_2" ]
steps:
- name: Deploy on ${{ matrix.name }} server
- name: Set environment variables
run: |
echo "PROD_REMOTE_SERVER_ADDRESS_${{ matrix.server }}=${{ secrets['PROD_REMOTE_SERVER_ADDRESS_' + matrix.server] }}" >> $GITHUB_ENV
- name: Deploy on ${{ matrix.server }} server
if: github.ref == 'refs/heads/prod'
uses: appleboy/ssh-action@v0.1.7
with:
host: ${{ matrix.address }}
host: ${{ env['PROD_REMOTE_SERVER_ADDRESS_' + matrix.server] }}
username: ${{ secrets.PROD_SERVER_USERNAME }}
key: ${{ secrets.PROD_REMOTE_SERVER_KEY }}
port: ${{ secrets.PROD_SSH_PORT }}
Expand Down

0 comments on commit d929859

Please sign in to comment.