Skip to content

ci(build): switch docker-compose to docker compose command in workflow #52

ci(build): switch docker-compose to docker compose command in workflow

ci(build): switch docker-compose to docker compose command in workflow #52

Workflow file for this run

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"