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