chore: update

This commit is contained in:
TakahashiNg
2026-03-26 14:44:53 +00:00
parent 174e46a50a
commit 8612d7d322
5 changed files with 448 additions and 41 deletions
+7 -1
View File
@@ -79,12 +79,18 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.ACCESS_TOKEN }}
- name: Prepare Docker Metadata
id: meta
run: |
REPO_LOWER=$(echo "${{ gitea.repository }}" | tr '[:upper:]' '[:lower:]')
echo "repo=$REPO_LOWER" >> $GITHUB_OUTPUT
- name: Build and Push Docker Image
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: gitea.demonkernel.io.vn/${{ gitea.repository }}:latest
tags: gitea.demonkernel.io.vn/${{ steps.meta.outputs.repo }}:latest
deploy-via-portainer:
if: gitea.ref == 'refs/heads/main'
+28 -1
View File
@@ -1,5 +1,32 @@
# --- Giai đoạn 1: Build ---
FROM node:18-alpine AS builder
# Cài đặt pnpm
RUN corepack enable && corepack prepare pnpm@latest --activate
WORKDIR /app
# Copy file định nghĩa package
COPY package.json pnpm-lock.yaml ./
# Cài đặt dependencies (sử dụng --frozen-lockfile để đảm bảo đúng phiên bản)
RUN pnpm install --frozen-lockfile
# Copy toàn bộ code
COPY . .
# Build Next.js (Yêu cầu next.config.js có output: 'export')
RUN pnpm run build
# --- Giai đoạn 2: Run (Sản phẩm cuối) ---
FROM nginx:alpine
COPY out/ /usr/share/nginx/html/
# Xóa file mặc định của nginx (tùy chọn nhưng nên làm)
RUN rm -rf /usr/share/nginx/html/*
# Copy folder out từ giai đoạn builder
COPY --from=builder /app/out /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
+1
View File
@@ -17,6 +17,7 @@
"tailwind": "^4.0.0"
},
"devDependencies": {
"@saithodev/semantic-release-gitea": "^2.1.0",
"@semantic-release/exec": "^7.1.0",
"@semantic-release/github": "^12.0.6",
"@semantic-release/npm": "^13.1.5",
+402 -36
View File
File diff suppressed because it is too large Load Diff
+8 -1
View File
@@ -3,7 +3,14 @@ import type { GlobalConfig } from "semantic-release";
const config: GlobalConfig = {
tagFormat: "v${version}",
repositoryUrl: "https://git.demonkernel.io.vn/FoodSurf/frontend.git",
branches: ["main", { name: "dev-*", prerelease: "dev" }],
branches: [
"main",
{
name: "dev-*",
prerelease: "${name.replace('dev-', '')}",
channel: "${name.replace('dev-', '')}",
},
],
plugins: [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",