ci(build): switch docker-compose to docker compose command in workflow #52
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Github Actions | |
on: | |
push: | |
branches: | |
- master | |
- develop | |
pull_request: | |
branches: | |
- master | |
jobs: | |
frontend: | |
runs-on: ubuntu-latest | |
services: | |
docker: | |
image: docker:27.0-dind | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build the Docker image | |
run: | | |
docker compose -f docker-compose.prod.yml build | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Build and push Docker Compose | |
run: | | |
docker compose -f docker-compose.prod.yml push | |
- name: Configure SSH | |
run: | | |
mkdir -p ~/.ssh | |
echo "${{ secrets.AZURE_PRIVATE_KEY }}" > ~/.ssh/id_rsa | |
chmod 600 ~/.ssh/id_rsa | |
ssh-keyscan 20.124.2.0 >> ~/.ssh/known_hosts | |
- name: Deploy code | |
run: | | |
ssh [email protected] "cd ./retrogasteiz && ./deploy.sh" |