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