优化结构

This commit is contained in:
biss committed 2026-06-18 21:44:37 +08:00
1 parent 3051fe2d6a
commit cb244eb983
74 files changed
+93 -143

No files matched your search

+10 -13
View File
@@ -1,4 +1,4 @@
name: 自动部署 name: 鑷姩閮ㄧ讲
on: on:
push: push:
branches: branches:
@@ -13,11 +13,11 @@ jobs:
deploy: deploy:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: 检查分支 - name: 妫€鏌ュ垎鏀?
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
ref: master ref: master
- name: 缓存项目 npm 包 - name: 缂撳瓨椤圭洰 npm 鍖?
id: cache-node-modules id: cache-node-modules
uses: actions/cache@v3 uses: actions/cache@v3
with: with:
@@ -25,31 +25,28 @@ jobs:
key: ${{ runner.os }}-nodeModules-${{ hashFiles('package-lock.json') }}-${{ hashFiles('package.json') }} key: ${{ runner.os }}-nodeModules-${{ hashFiles('package-lock.json') }}-${{ hashFiles('package.json') }}
restore-keys: | restore-keys: |
${{ runner.os }}-nodeModules- ${{ runner.os }}-nodeModules-
- name: 安装 Node - name: 瀹夎 Node
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version: "22.x" node-version: "22.x"
- name: 安装 Hexo - name: 瀹夎渚濊禆
run: |
npm install hexo-cli --global
- name: 安装依赖
if: steps.cache-node-modules.outputs.cache-hit != 'true' if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: | run: |
npm install npm install
- name: 清理文件树 - name: 娓呯悊鏂囦欢鏍?
run: | run: |
npm run clean npm run clean
- name: 生成静态文件并压缩 - name: 鐢熸垚闈欐€佹枃浠跺苟鍘嬬缉
run: | run: |
npm run build npm run build
- name: 部署 - name: 閮ㄧ讲
run: | run: |
cd ./public cd ./dist
git init git init
git config user.name "${{ gitea.actor }}" git config user.name "${{ gitea.actor }}"
git config user.email "${{ gitea.actor }}@noreply.gitea.io" git config user.email "${{ gitea.actor }}@noreply.gitea.io"
git add . git add .
git commit -m "${{ gitea.event.head_commit.message }}··[$(date +"%Z %Y-%m-%d %A %H:%M:%S")]" git commit -m "${{ gitea.event.head_commit.message }}路路[$(date +"%Z %Y-%m-%d %A %H:%M:%S")]"
git push --force --quiet "https://${{ gitea.actor }}:${{ secrets.DEPLOY_TOKEN }}@git.biss.click/biss/blog.git" master:page git push --force --quiet "https://${{ gitea.actor }}:${{ secrets.DEPLOY_TOKEN }}@git.biss.click/biss/blog.git" master:page
- name: Deploy to Server - name: Deploy to Server
run: | run: |
+1 -1
View File
@@ -4,7 +4,7 @@ db.json
*.log *.log
node_modules/ node_modules/
.astro/ .astro/
public/ dist/
.deploy*/ .deploy*/
_multiconfig.yml _multiconfig.yml
.hintrc .hintrc
-2
View File
@@ -8,8 +8,6 @@ import remarkHexoLinkCards from './src/lib/remarkHexoLinkCards.mjs';
export default defineConfig({ export default defineConfig({
site: 'https://blog.biss.click', site: 'https://blog.biss.click',
output: 'static', output: 'static',
outDir: './public',
publicDir: './static',
integrations: [sitemap()], integrations: [sitemap()],
markdown: { markdown: {
processor: unified({ processor: unified({
Loaded 3 of 74 files, more files were not shown because too many files have changed in this diff. Show more