Skip to content

Commit

Permalink
Update variamosple-main-aws-image.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
64lines committed Mar 3, 2024
1 parent 33a366c commit 6cdf475
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/variamosple-main-aws-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,25 @@ jobs:
echo "REACT_APP_URLVARIAMOSLANGUAGES=${{vars.REACT_APP_URLVARIAMOSLANGUAGES}}" >> .env
echo "REACT_APP_URLVARIAMOSDOCUMENTATION=${{vars.REACT_APP_URLVARIAMOSDOCUMENTATION}}" >> .env
echo "REACT_APP_URLVARIAMOSLANGDOCUMENTATION=${{vars.REACT_APP_URLVARIAMOSLANGDOCUMENTATION}}" >> .env
- name: Build and push container image to registry
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: ${{vars.ACR_DOKCERHUB}}/${{secrets.ACRUSERNAME_DOKCERHUB}}/variamosple:main
file: ./Dockerfile

- name: Set up SSH Key
run: echo "${{ secrets.VARIAMOS_AWS_PEM }}" > ~/.ssh/id_rsa.pem && chmod 600 ~/.ssh/id_rsa.pem

- name: Deploy changes into the server
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SSH_HOST }}
key: |
${{ secrets.VARIAMOS_AWS_PEM }}
script: |
echo "Executing command on remote server..."
sudo docker compose --env-file .env.aws.develop -f docker-compose-aws-develop-nginx.yml pull
sudo docker compose --env-file .env.aws.develop -f docker-compose-aws-develop-nginx.yml up -d

0 comments on commit 6cdf475

Please sign in to comment.