修改部署配置,使用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 init -y
|
||||||
npm install js-yaml
|
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
|
- name: Generate site
|
||||||
run: node generator.js
|
run: node generator.js
|
||||||
|
|
||||||
- name: List files
|
- name: List files
|
||||||
run: ls -la
|
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
|
- name: Deploy to GitHub Pages
|
||||||
uses: JamesIves/github-pages-deploy-action@v4
|
uses: JamesIves/github-pages-deploy-action@v4
|
||||||
with:
|
with:
|
||||||
folder: .
|
folder: dist
|
||||||
branch: gh-pages
|
branch: gh-pages
|
||||||
clean: true
|
clean: true
|
||||||
Reference in New Issue
Block a user