chore: remove debug steps and loyment workflow
This commit is contained in:
@@ -30,52 +30,55 @@ jobs:
|
|||||||
- name: Build
|
- name: Build
|
||||||
run: npm run build
|
run: npm run build
|
||||||
|
|
||||||
- name: 🔍 Debug - List Build Files
|
# - name: 🔍 Debug - List Build Files
|
||||||
run: |
|
# run: |
|
||||||
echo "======================="
|
# echo "======================="
|
||||||
echo "1. Root directory files:"
|
# echo "1. Root directory files:"
|
||||||
ls -la
|
# ls -la
|
||||||
|
|
||||||
echo "======================="
|
# echo "======================="
|
||||||
echo "2. Checking .next directory:"
|
# echo "2. Checking .next directory:"
|
||||||
if [ -d ".next" ]; then
|
# if [ -d ".next" ]; then
|
||||||
ls -la .next
|
# ls -la .next
|
||||||
else
|
# else
|
||||||
echo "❌ Error: .next folder does not exist!"
|
# echo "❌ Error: .next folder does not exist!"
|
||||||
fi
|
# fi
|
||||||
|
|
||||||
echo "======================="
|
# echo "======================="
|
||||||
echo "3. Deep check of .next (excluding node_modules):"
|
# echo "3. Deep check of .next (excluding node_modules):"
|
||||||
# 查找 .next 目录下 4 层深度的文件,但排除 node_modules 避免日志太长
|
# # 查找 .next 目录下 4 层深度的文件,但排除 node_modules 避免日志太长
|
||||||
find .next -maxdepth 4 -not -path '*/node_modules*'
|
# find .next -maxdepth 4 -not -path '*/node_modules*'
|
||||||
|
|
||||||
# - name: Prepare standalone build
|
- name: Prepare standalone build
|
||||||
# run: |
|
run: |
|
||||||
# cp -r public .next/standalone/public
|
mkdir -p .next/standalone/public
|
||||||
# cp -r .next/static .next/standalone/.next/static
|
mkdir -p .next/standalone/.next/static
|
||||||
# cp Dockerfile .next/standalone/Dockerfile
|
|
||||||
|
|
||||||
# - name: Upload production build artifact
|
cp -r public/* .next/standalone/public/
|
||||||
# uses: actions/upload-artifact@v3
|
cp -r .next/static/* .next/standalone/.next/static/
|
||||||
# with:
|
cp Dockerfile .next/standalone/Dockerfile
|
||||||
# name: next-build
|
|
||||||
# path: .next/standalone
|
|
||||||
|
|
||||||
# deploy:
|
- name: Upload production build artifact
|
||||||
# needs: build-and-test
|
uses: actions/upload-artifact@v3
|
||||||
# runs-on: CDCD
|
with:
|
||||||
# container:
|
name: next-build
|
||||||
# image: dockerreg.eazygame.cn/node-with-docker:22
|
path: .next/standalone
|
||||||
# steps:
|
|
||||||
# - name: Download artifacts
|
|
||||||
# uses: actions/download-artifact@v3
|
|
||||||
# with:
|
|
||||||
# name: next-build
|
|
||||||
|
|
||||||
# - name: Deploy to Docker
|
deploy:
|
||||||
# run: |
|
needs: build-and-test
|
||||||
# docker build -t nextjs-app .
|
runs-on: CDCD
|
||||||
# docker stop nextjs-app || true
|
container:
|
||||||
# docker rm nextjs-app || true
|
image: dockerreg.eazygame.cn/node-with-docker:22
|
||||||
# docker run -d -p 8015:3000 --restart unless-stopped --name nextjs-app nextjs-app
|
steps:
|
||||||
|
- name: Download artifacts
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: next-build
|
||||||
|
|
||||||
|
- name: Deploy to Docker
|
||||||
|
run: |
|
||||||
|
docker build -t nextjs-app .
|
||||||
|
docker stop nextjs-app || true
|
||||||
|
docker rm nextjs-app || true
|
||||||
|
docker run -d -p 8015:3000 --restart unless-stopped --name nextjs-app nextjs-app
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user