From 66d24031499a7ccbcc2551e1f4fbfae76cbe2b84 Mon Sep 17 00:00:00 2001 From: Matt DiMeglio Date: Tue, 10 Jun 2025 16:30:03 -0400 Subject: [PATCH 1/3] Create web-deploy.yml --- .github/workflows/web-deploy.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/web-deploy.yml diff --git a/.github/workflows/web-deploy.yml b/.github/workflows/web-deploy.yml new file mode 100644 index 0000000..74f387f --- /dev/null +++ b/.github/workflows/web-deploy.yml @@ -0,0 +1,22 @@ +name: Web Deployment +on: + workflow_dispatch: {} + pull_request: + branches: + - main + types: + - opened + - reopened + - synchronize + - ready_for_review + push: + branches: + - main + paths: + - web/** +jobs: + deploy: + permissions: + contents: read + runs-on: ['self-hosted', 'pi'] + From 65bfb2ccd0a2e8a63ba972df4006024dcb49c600 Mon Sep 17 00:00:00 2001 From: Matt DiMeglio Date: Tue, 10 Jun 2025 17:04:17 -0400 Subject: [PATCH 2/3] Update web-deploy.yml --- .github/workflows/web-deploy.yml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/web-deploy.yml b/.github/workflows/web-deploy.yml index 74f387f..419ba1e 100644 --- a/.github/workflows/web-deploy.yml +++ b/.github/workflows/web-deploy.yml @@ -16,7 +16,26 @@ on: - web/** jobs: deploy: + runs-on: ['self-hosted', 'pi'] permissions: contents: read - runs-on: ['self-hosted', 'pi'] + packages: write + steps: + - uses: actions/checkout@v4 + - name: Login to Docker + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USER }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Build Image and Push to Registry + uses: docker/build-push-action@v6 + with: + context: . + file: Dockerfile + platforms: linux/amd64 + push: true + tags: user/app:latest + - name: Deploy to Coolify + run: | + curl --request GET '${{ secrets.COOLIFY_WEBHOOK }}' --header 'Authorization: Bearer ${{ secrets.COOLIFY_TOKEN }}' From 615a8537f5d6c4369e10ed4b6ad59281a77676f5 Mon Sep 17 00:00:00 2001 From: Matt DiMeglio Date: Tue, 10 Jun 2025 17:13:44 -0400 Subject: [PATCH 3/3] Update web-deploy.yml --- .github/workflows/web-deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/web-deploy.yml b/.github/workflows/web-deploy.yml index 419ba1e..007af53 100644 --- a/.github/workflows/web-deploy.yml +++ b/.github/workflows/web-deploy.yml @@ -16,6 +16,7 @@ on: - web/** jobs: deploy: + environment: dev runs-on: ['self-hosted', 'pi'] permissions: contents: read