From 5bd115d41105b8d8979001247cba83402e384f31 Mon Sep 17 00:00:00 2001 From: Zuoling Rong Date: Sat, 1 Feb 2025 16:50:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=83=A8=E7=BD=B2=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=EF=BC=8C=E4=BD=BF=E7=94=A8dist=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 5f92036..ff1b9d7 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -26,15 +26,35 @@ jobs: npm init -y npm install js-yaml + - name: Create necessary files + run: | + # 创建基本的样式文件 + echo "/* 基本样式 */ + body { font-family: Arial, sans-serif; } + .loading { display: none; } + " > style.css + + # 创建基本的脚本文件 + echo "// 基本脚本 + console.log('Navigation site loaded'); + " > script.js + - name: Generate site run: node generator.js - name: List files run: ls -la + - name: Create dist directory + run: | + mkdir -p dist + cp index.html dist/ + cp style.css dist/ + cp script.js dist/ + - name: Deploy to GitHub Pages uses: JamesIves/github-pages-deploy-action@v4 with: - folder: . + folder: dist branch: gh-pages clean: true \ No newline at end of file