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