修改部署配置,使用dist目录
This commit is contained in:
22
.github/workflows/deploy.yml
vendored
22
.github/workflows/deploy.yml
vendored
@@ -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
|
||||
Reference in New Issue
Block a user