fix: 更新部署配置和生成器代码

This commit is contained in:
Zuoling Rong
2025-02-01 17:21:34 +08:00
parent 66fdccad59
commit 9a70ec863a
3 changed files with 5 additions and 26 deletions

View File

@@ -22,34 +22,14 @@ jobs:
node-version: '16' node-version: '16'
- name: Install dependencies - name: Install dependencies
run: | run: npm install
npm init -y
npm install js-yaml
- name: Generate site - name: Generate site
run: node generator.js run: node generator.js
- name: Prepare deployment
run: |
# 确保目录存在
mkdir -p dist
# 复制网站文件
cp index.html dist/
cp style.css dist/
cp script.js dist/
# 显示文件列表以验证
echo "Deployment files:"
ls -la dist/
# 检查文件内容
echo "Checking index.html..."
head -n 10 dist/index.html
- 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: dist folder: .
branch: gh-pages branch: gh-pages
clean: true clean: true

View File

@@ -102,9 +102,8 @@ function generateHTML(config) {
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>${config.site.title}</title> <title>${config.site.title}</title>
<link rel="stylesheet" href="/menav/style.css"> <link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
<base href="/menav/">
</head> </head>
<body class="loading"> <body class="loading">
<div class="layout"> <div class="layout">

View File

@@ -75,7 +75,7 @@
<div class="welcome-section"> <div class="welcome-section">
<h2>Hello,</h2> <h2>Hello,</h2>
<h3>Welcome to My Navigation</h3> <h3>Welcome to My Navigation</h3>
<p class="subtitle">Front-end Developer / Open Source Enthusiast / Blogger</p> <p class="subtitle">导航菜单</p>
</div> </div>
<section class="category"> <section class="category">
@@ -139,7 +139,7 @@
<p>基于Vue3的待办事项管理器</p> <p>基于Vue3的待办事项管理器</p>
</a> </a>
<a href="https://blog.rzlnb.top/" class="site-card"> <a href="#" class="site-card">
<i class="fas fa-blog"></i> <i class="fas fa-blog"></i>
<h3>个人博客</h3> <h3>个人博客</h3>
<p>使用Hexo搭建的技术博客</p> <p>使用Hexo搭建的技术博客</p>