Compare commits
2
Commits
b377bdc687
...
ac7991a37c
No files matched your search
+12
-12
@@ -17,37 +17,37 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: master
|
||||
- name: 缓存项目 npm 包
|
||||
id: cache-node-modules
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: node_modules
|
||||
key: ${{ runner.os }}-nodeModules-${{ hashFiles('package-lock.json') }}-${{ hashFiles('package.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-nodeModules-
|
||||
- name: 安装 Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "22.x"
|
||||
- name: 安装依赖
|
||||
if: steps.cache-node-modules.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
npm install
|
||||
npm ci
|
||||
- name: 同步 Astro 类型
|
||||
run: |
|
||||
npm run clean
|
||||
- name: 生成静态文件
|
||||
run: |
|
||||
npm run build
|
||||
- name: 检查部署密钥
|
||||
env:
|
||||
DEPLOY_HOOK_KEY: ${{ secrets.DEPLOY_HOOK_KEY }}
|
||||
run: test -n "$DEPLOY_HOOK_KEY"
|
||||
- name: 部署到 page 分支
|
||||
env:
|
||||
COMMIT_MESSAGE: ${{ gitea.event.head_commit.message }}
|
||||
run: |
|
||||
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 "${COMMIT_MESSAGE:-Deploy} -- [$(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: 触发服务器部署
|
||||
env:
|
||||
DEPLOY_HOOK_KEY: ${{ secrets.DEPLOY_HOOK_KEY }}
|
||||
run: |
|
||||
curl -k -X POST "https://panel.biss.click/hook?access_key=1XJG8IvYTSZVvD5dpm86GYIpQxgxBcucULnX1MFskZSKayXU"
|
||||
test -n "$DEPLOY_HOOK_KEY"
|
||||
curl --fail --silent --show-error --get --data-urlencode "access_key=$DEPLOY_HOOK_KEY" -X POST "https://panel.biss.click/hook"
|
||||
Generated
+1037
-364
File diff suppressed because it is too large.
Load diff
+4
-4
@@ -11,12 +11,12 @@
|
||||
"server": "astro dev"
|
||||
},
|
||||
"dependencies": {
|
||||
"@astrojs/markdown-remark": "^7.3.5",
|
||||
"@astrojs/markdown-remark": "^7.3.10",
|
||||
"@astrojs/rss": "^4.0.19",
|
||||
"@astrojs/sitemap": "^3.7.4",
|
||||
"astro": "^7.4.4",
|
||||
"@astrojs/sitemap": "^3.7.6",
|
||||
"astro": "^7.4.13",
|
||||
"rehype-mathjax": "^7.1.0",
|
||||
"remark-math": "^6.0.0",
|
||||
"typesense": "^3.2.0"
|
||||
"typesense": "^3.3.0"
|
||||
}
|
||||
}
|
||||
Loaded 3 of 10 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user