Skip to content

Build All and Deploy #15

Build All and Deploy

Build All and Deploy #15

Workflow file for this run

name: Build All and Deploy
on:
workflow_dispatch:
permissions:
packages: write
jobs:
build_app:
uses: ./.github/workflows/build-component.yaml
with:
component: app
build_server:
uses: ./.github/workflows/build-component.yaml
with:
component: server
deploy_all:
runs-on: ubuntu-latest
needs: [build_app, build_server]
steps:
- name: Configure ssh key
env:
PRIVATE_KEY: ${{ secrets.GROCERIES_PRIVATE_KEY }}
run: |
echo "$PRIVATE_KEY" > id_rsa_groceries
chmod 600 id_rsa_groceries
- name: Docker Compose up
env:
HOST: "149.130.209.48"
run: |
ssh -i id_rsa_groceries -o "StrictHostKeyChecking no" groceries@$HOST "
curl -o docker-compose.yaml https://raw.githubusercontent.com/collinmurd/groceries/main/docker-compose-prod.yaml
docker compose up -d
"