blog/.gitea/workflows/deployment.yaml
SquidSpirit 0726b11fe2
All checks were successful
Frontend CI / build (push) Successful in 1m37s
BLOG-59 Enhance deployment workflow and backend server configuration (#60)
### Description

- Updated deployment.yaml to specify separate build and push steps for frontend and backend.
- Added Dockerfile for backend service to define build process.
- Modified main.rs to bind the server to all network interfaces (0.0.0.0) instead of localhost.

### Package Changes

_No response_

### Screenshots

_No response_

### Reference

Resolves #59

### Checklist

- [x] A milestone is set
- [x] The related issuse has been linked to this branch

Reviewed-on: #60
Co-authored-by: SquidSpirit <squid@squidspirit.com>
Co-committed-by: SquidSpirit <squid@squidspirit.com>
2025-07-23 00:59:18 +08:00

46 lines
1.3 KiB
YAML

name: Deployment
on:
release:
types:
- published
jobs:
frontend-deployment:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to registry
uses: docker/login-action@v3
with:
registry: ${{ vars.REGISTRY }}
username: ${{ vars.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Build and push (Frontend)
uses: docker/build-push-action@v6
with:
push: true
provenance: false
context: ./frontend
tags: |
${{ vars.REGISTRY }}/${{ vars.IMAGE_REPO_FRONTEND }}:latest
${{ vars.REGISTRY }}/${{ vars.IMAGE_REPO_FRONTEND }}:${{ gitea.event.release.tag_name }}
- name: Build and push (Backend)
uses: docker/build-push-action@v6
with:
push: true
provenance: false
context: ./backend
tags: |
${{ vars.REGISTRY }}/${{ vars.IMAGE_REPO_BACKEND }}:latest
${{ vars.REGISTRY }}/${{ vars.IMAGE_REPO_BACKEND }}:${{ gitea.event.release.tag_name }}