Skip to content
This repository has been archived by the owner on Jan 25, 2024. It is now read-only.

Commit

Permalink
Deploy continuously
Browse files Browse the repository at this point in the history
  • Loading branch information
floriandejonckheere committed Dec 4, 2023
1 parent 1ae004d commit 7c77677
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
push:
branches:
- master
workflow_dispatch:

jobs:
ci:
Expand Down Expand Up @@ -65,3 +66,21 @@ jobs:
file: Dockerfile
push: true
tags: ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:latest

- name: Set up docker context
uses: amirmarmul/docker-context-ssh-action@v2
with:
ssh-host: ${{ secrets.SSH_HOST }}
ssh-username: ${{ secrets.SSH_USER }}
ssh-private-key: ${{ secrets.SSH_KEY }}
context-name: cloud
context-use: true

- name: Deploy application
env:
GHCR_USER: ${{ secrets.GHCR_TOKEN }}
GHCR_TOKEN: ${{ secrets.GHCR_TOKEN }}
COMPOSE_PROJECT_NAME: ${{ github.event.repository.name }}
run: |
docker-compose pull
docker-compose up --detach app

0 comments on commit 7c77677

Please sign in to comment.