Skip to content

Feat/refactors (#11) #5

Feat/refactors (#11)

Feat/refactors (#11) #5

Workflow file for this run

name: Deploy
on:
push:
branches: [main]
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build:
name: Build & Push Image
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to ghcr.io
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build image and push to registry
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile
platforms: linux/amd64
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
cache-from: type=gha
cache-to: type=gha,mode=max
deploy:
name: Deploy to Dokploy
runs-on: ubuntu-latest
needs: build
environment:
name: production
steps:
- name: Deploy to Dokploy
uses: qbix-tech/dokploy-deploy-action@v1
with:
dokploy_url: ${{ secrets.DOKPLOY_HOST }}
api_key: ${{ secrets.DOKPLOY_AUTH_TOKEN }}
application_id: ${{ secrets.DOKPLOY_APPLICATION_ID }}