This commit is contained in:
@ -1,4 +1,4 @@
|
|||||||
name: Deploy Application
|
name: Deploy Nuxt App
|
||||||
on: [push]
|
on: [push]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@ -8,27 +8,37 @@ jobs:
|
|||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
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: |
|
run: |
|
||||||
if command -v apt-get &> /dev/null; then
|
npm install
|
||||||
apt-get update && apt-get install -y curl
|
npm run build
|
||||||
elif command -v apk &> /dev/null; then
|
|
||||||
apk add --no-cache curl
|
|
||||||
elif command -v yum &> /dev/null; then
|
|
||||||
yum install -y curl
|
|
||||||
fi
|
|
||||||
|
|
||||||
- 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:
|
env:
|
||||||
GITEA_API: "https://gitea.miduway.space/api/v1/repos/levis/ebook/raw/main"
|
GITEA_API: "https://gitea.miduway.space/api/v1/repos/levis/ebook/raw/production"
|
||||||
GITEA_TOKEN: "0406afe7de6547e850dd62c84976c6def23a5193"
|
GITEA_TOKEN: ${{ secrets.TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
for file in docker-compose.yml Dockerfile; do
|
for file in Dockerfile docker-compose.yml; do
|
||||||
echo "Uploading $file"
|
|
||||||
curl -X PUT \
|
curl -X PUT \
|
||||||
-H "Authorization: token $GITEA_TOKEN" \
|
-H "Authorization: token $TOKEN" \
|
||||||
|
-H "Content-Type: text/plain" \
|
||||||
-T "$file" \
|
-T "$file" \
|
||||||
"$GITEA_API/$file"
|
"$GITEA_API/$file?branch=main"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
curl -X PUT \
|
||||||
|
-H "Authorization: token $TOKEN" \
|
||||||
|
-H "Content-Type: application/gzip" \
|
||||||
|
-T "deploy.tar.gz" \
|
||||||
|
"$GITEA_API/deploy.tar.gz?branch=main"
|
||||||
|
2
.nuxt/nuxt.d.ts
vendored
2
.nuxt/nuxt.d.ts
vendored
@ -1,9 +1,9 @@
|
|||||||
/// <reference types="@nuxt/eslint" />
|
/// <reference types="@nuxt/eslint" />
|
||||||
/// <reference types="@nuxt/icon" />
|
/// <reference types="@nuxt/icon" />
|
||||||
/// <reference types="@nuxt/image" />
|
/// <reference types="@nuxt/image" />
|
||||||
/// <reference types="@pinia/nuxt" />
|
|
||||||
/// <reference types="@nuxtjs/tailwindcss" />
|
/// <reference types="@nuxtjs/tailwindcss" />
|
||||||
/// <reference types="@pinia/nuxt" />
|
/// <reference types="@pinia/nuxt" />
|
||||||
|
/// <reference types="@pinia/nuxt" />
|
||||||
/// <reference types="@nuxt/devtools" />
|
/// <reference types="@nuxt/devtools" />
|
||||||
/// <reference types="@nuxt/telemetry" />
|
/// <reference types="@nuxt/telemetry" />
|
||||||
/// <reference path="types/builder-env.d.ts" />
|
/// <reference path="types/builder-env.d.ts" />
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// generated by the @nuxtjs/tailwindcss <https://github.com/nuxt-modules/tailwindcss> module at 6/18/2025, 4:55:05 AM
|
// generated by the @nuxtjs/tailwindcss <https://github.com/nuxt-modules/tailwindcss> module at 6/19/2025, 4:53:06 PM
|
||||||
import "@nuxtjs/tailwindcss/config-ctx"
|
import "@nuxtjs/tailwindcss/config-ctx"
|
||||||
import configMerger from "@nuxtjs/tailwindcss/merger";
|
import configMerger from "@nuxtjs/tailwindcss/merger";
|
||||||
|
|
||||||
|
@ -119,7 +119,7 @@
|
|||||||
"./imports"
|
"./imports"
|
||||||
],
|
],
|
||||||
"#app-manifest": [
|
"#app-manifest": [
|
||||||
"./manifest/meta/e4f4ddb1-4c47-45da-a6d9-ad6f888061fb.json"
|
"./manifest/meta/f4dfbb73-66a7-4162-b534-4c8db9f3aa74.json"
|
||||||
],
|
],
|
||||||
"#components": [
|
"#components": [
|
||||||
"./components"
|
"./components"
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
FROM node:18-alpine
|
FROM node:22-alpine
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
COPY package*..json ./
|
COPY package*.json ./
|
||||||
RUN npm install
|
RUN npm install
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
CMD ["node", ".dist/server/index.mjs"]
|
CMD ["node", "dist/server/index.mjs"]
|
||||||
|
Reference in New Issue
Block a user