diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml
index 71f5555..91202c7 100644
--- a/.gitea/workflows/deploy.yml
+++ b/.gitea/workflows/deploy.yml
@@ -1,4 +1,4 @@
-name: Deploy Application
+name: Deploy Nuxt App
on: [push]
jobs:
@@ -8,27 +8,37 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3
with:
- token: 0406afe7de6547e850dd62c84976c6def23a5193
+ token: ${{ secrets.TOKEN }}
- - name: Install curl
+ - name: Setup Node.js
+ uses: actions/setup-node@v3
+ with:
+ node-version: '22'
+
+ - name: Install dependencies and build
run: |
- if command -v apt-get &> /dev/null; then
- apt-get update && apt-get install -y curl
- elif command -v apk &> /dev/null; then
- apk add --no-cache curl
- elif command -v yum &> /dev/null; then
- yum install -y curl
- fi
+ npm install
+ npm run build
- - name: Upload config files to server
+ - name: Prepare deployment files
+ run: |
+ tar -czf deploy.tar.gz dist Dockerfile docker-compose.yml
+
+ - name: Upload files via Gitea API
env:
- GITEA_API: "https://gitea.miduway.space/api/v1/repos/levis/ebook/raw/main"
- GITEA_TOKEN: "0406afe7de6547e850dd62c84976c6def23a5193"
+ GITEA_API: "https://gitea.miduway.space/api/v1/repos/levis/ebook/raw/production"
+ GITEA_TOKEN: ${{ secrets.TOKEN }}
run: |
- for file in docker-compose.yml Dockerfile; do
- echo "Uploading $file"
+ for file in Dockerfile docker-compose.yml; do
curl -X PUT \
- -H "Authorization: token $GITEA_TOKEN" \
+ -H "Authorization: token $TOKEN" \
+ -H "Content-Type: text/plain" \
-T "$file" \
- "$GITEA_API/$file"
+ "$GITEA_API/$file?branch=main"
done
+
+ curl -X PUT \
+ -H "Authorization: token $TOKEN" \
+ -H "Content-Type: application/gzip" \
+ -T "deploy.tar.gz" \
+ "$GITEA_API/deploy.tar.gz?branch=main"
diff --git a/.nuxt/nuxt.d.ts b/.nuxt/nuxt.d.ts
index e430094..20d4c26 100644
--- a/.nuxt/nuxt.d.ts
+++ b/.nuxt/nuxt.d.ts
@@ -1,9 +1,9 @@
///
///
///
-///
///
///
+///
///
///
///
diff --git a/.nuxt/tailwind/postcss.mjs b/.nuxt/tailwind/postcss.mjs
index 0b11037..9cd5847 100644
--- a/.nuxt/tailwind/postcss.mjs
+++ b/.nuxt/tailwind/postcss.mjs
@@ -1,4 +1,4 @@
-// generated by the @nuxtjs/tailwindcss module at 6/18/2025, 4:55:05 AM
+// generated by the @nuxtjs/tailwindcss module at 6/19/2025, 4:53:06 PM
import "@nuxtjs/tailwindcss/config-ctx"
import configMerger from "@nuxtjs/tailwindcss/merger";
diff --git a/.nuxt/tsconfig.json b/.nuxt/tsconfig.json
index 674bfa0..e1afd5b 100644
--- a/.nuxt/tsconfig.json
+++ b/.nuxt/tsconfig.json
@@ -119,7 +119,7 @@
"./imports"
],
"#app-manifest": [
- "./manifest/meta/e4f4ddb1-4c47-45da-a6d9-ad6f888061fb.json"
+ "./manifest/meta/f4dfbb73-66a7-4162-b534-4c8db9f3aa74.json"
],
"#components": [
"./components"
diff --git a/Dockerfile b/Dockerfile
index e78b90e..b29ac53 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,7 +1,7 @@
-FROM node:18-alpine
+FROM node:22-alpine
WORKDIR /usr/src/app
-COPY package*..json ./
+COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
-CMD ["node", ".dist/server/index.mjs"]
+CMD ["node", "dist/server/index.mjs"]