Update CONIFG.md

This commit is contained in:
Meekdai 2023-08-01 17:04:29 +08:00 committed by GitHub
parent 281c0b09ef
commit b34ddae43f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,18 +12,20 @@
"homeUrl":"http://blog.meekdai.com",
"avatarUrl":"http://meekdai.com/avatar.jpg",
"faviconUrl":"http://meekdai.com/favicon.ico",
"email":"meekdai@163.com",
"startSite":"02/16/2015",
"filingNum":"浙ICP备20023628号",
"singlePage":["link","about"],
"commentLabelColor":"#006b75",
"yearColorList":["#bc4c00", "#0969da", "#1f883d", "#A333D0"],
"i18n":"CN"
"i18n":"CN",
"GMEEK_VERSION":"v1.2"
}
```
### `.github/workflows/Gmeek.yml` 文件
注意修改其中的`GITHUB_NAME`和`GITHUB_EMAIL`两个参数
此文件保存到指定目录即可,无需修改
```yml
name: build Gmeek
@ -33,11 +35,6 @@ on:
issues:
types: [opened, edited]
env:
GITHUB_NAME: Meekdai
GITHUB_EMAIL: meekdai@163.com
GMEEK_VERSION: v1.1
jobs:
build:
name: Generate blog
@ -52,6 +49,13 @@ jobs:
id: pages
uses: actions/configure-pages@v3
- name: Get config.json
run: |
echo "====== check config.josn file ======"
cat config.json
echo "====== check config.josn end ======"
sudo apt-get install jq
- name: Set up Python
uses: actions/setup-python@v4
with:
@ -59,7 +63,7 @@ jobs:
- name: Clone source code
run: |
git clone -b ${{ env.GMEEK_VERSION }} https://github.com/Meekdai/Gmeek.git /opt/Gmeek
git clone -b $(jq -r ".GMEEK_VERSION" config.json) https://github.com/Meekdai/Gmeek.git /opt/Gmeek
- name: Install dependencies
run: |
@ -70,18 +74,15 @@ jobs:
run: |
cp -r ./* /opt/Gmeek/
cd /opt/Gmeek/
echo "====== check config.josn file ======"
cat config.json
echo "====== check config.josn end ======"
python Gmeek.py ${{ secrets.GITHUB_TOKEN }} ${{ github.repository }} ${{ env.GMEEK_VERSION }} --issue_number '${{ github.event.issue.number }}'
python Gmeek.py ${{ secrets.GITHUB_TOKEN }} ${{ github.repository }} $(jq -r ".GMEEK_VERSION" config.json) --issue_number '${{ github.event.issue.number }}'
cp -a /opt/Gmeek/docs ${{ github.workspace }}
cp -a /opt/Gmeek/backup ${{ github.workspace }}
cp /opt/Gmeek/blogBase.json ${{ github.workspace }}
- name: update html
run: |
git config --local user.email "${{ env.GITHUB_EMAIL }}"
git config --local user.name "${{ env.GITHUB_NAME }}"
git config --local user.email "$(jq -r ".email" config.json)"
git config --local user.name "${{ github.repository_owner }}"
git add .
git commit -a -m '🎉auto update by Gmeek action' || echo "nothing to commit"
git push || echo "nothing to push"