mirror of
https://github.com/LowderPlay/cheburcheck.git
synced 2026-10-01 19:28:08 +03:00
feat: change to ssr (#69)
* feat: change to ssr * fix: move route to nginx * fix: rename yaml * ci: add deploy * fix: real ip
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
name: Build and Publish Website Docker Image
|
||||
name: Build and Publish Docker Images
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -13,7 +13,19 @@ env:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build ${{ matrix.service }} image
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- service: website
|
||||
file: ./website/Dockerfile
|
||||
context: .
|
||||
image_suffix: ""
|
||||
- service: frontend
|
||||
file: ./frontend/Dockerfile
|
||||
context: ./frontend
|
||||
image_suffix: "-frontend"
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
@@ -38,7 +50,7 @@ jobs:
|
||||
id: meta
|
||||
uses: docker/metadata-action@v6
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}${{ matrix.image_suffix }}
|
||||
tags: |
|
||||
type=ref,event=branch
|
||||
type=ref,event=pr
|
||||
@@ -51,10 +63,21 @@ jobs:
|
||||
id: build-and-push
|
||||
uses: docker/build-push-action@v7
|
||||
with:
|
||||
context: .
|
||||
file: ./website.Dockerfile
|
||||
context: ${{ matrix.context }}
|
||||
file: ${{ matrix.file }}
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
|
||||
deploy:
|
||||
name: Deploy
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
if: github.event_name != 'pull_request'
|
||||
|
||||
steps:
|
||||
- name: Trigger Coolify deploy
|
||||
run: |
|
||||
curl --fail --request GET '${{ secrets.COOLIFY_WEBHOOK }}' --header 'Authorization: Bearer ${{ secrets.COOLIFY_TOKEN }}'
|
||||
|
||||
Reference in New Issue
Block a user