fix: deploy frontend to coolify (#779)

* Ignore act secrets

* Deploy frontend container to ECR

* Use published image

* Remove ecr workflows

* Trigger coolify deployment

* Deploy on release please pr merge

* Upgrade nextjs

* Update secrets example
This commit is contained in:
2025-12-10 13:35:53 +01:00
committed by GitHub
parent 61f0e29d4c
commit 91650ec65f
8 changed files with 104 additions and 159 deletions

View File

@@ -1,13 +1,12 @@
name: Build and Push Frontend Docker Image
on:
push:
branches:
- main
- dockerhub-2
pull_request:
types:
- closed
paths:
- 'www/**'
- '.github/workflows/dockerhub-frontend.yml'
- "www/**"
- ".github/workflows/dockerhub-frontend.yml"
workflow_dispatch:
env:
@@ -17,6 +16,10 @@ env:
jobs:
build-and-push:
runs-on: ubuntu-latest
if: |
github.event_name == 'workflow_dispatch' ||
(github.event.pull_request.merged == true &&
startsWith(github.event.pull_request.head.ref, 'release-please--branches--'))
permissions:
contents: read
@@ -41,6 +44,7 @@ jobs:
type=ref,event=branch
type=sha,prefix={{branch}}-
type=raw,value=latest,enable={{is_default_branch}}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
@@ -55,4 +59,12 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/amd64,linux/arm64
platforms: linux/amd64,linux/arm64
- name: Trigger Coolify deployment
if: success()
run: |
curl -X POST "${{ secrets.COOLIFY_WEBHOOK_URL }}" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${{ secrets.COOLIFY_WEBHOOK_TOKEN }}" \
-f || (echo "Failed to trigger Coolify deployment" && exit 1)