From 929c97ce1bbfdcb1150a0d488e614c05decf59ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B5=AA=E5=AD=90?= Date: Fri, 18 Oct 2024 14:17:26 +0800 Subject: [PATCH] Initial commit --- .github/workflows/Gmeek.yml | 89 ++++++ README.md | 17 ++ ...45\351\252\244\346\211\247\350\241\214.md" | 5 + ...41\346\235\277\344\273\223\345\272\223.md" | 1 + config.json | 6 + docs/index.html | 169 +++++++++++ ...-zhi-hou-de-an-zhuang-bu-zou-zhi-xing.html | 172 +++++++++++ docs/post/zhe-shi-Gmeek-mo-ban-cang-ku.html | 170 +++++++++++ docs/postList.json | 1 + docs/rss.xml | 2 + docs/tag.html | 269 ++++++++++++++++++ 11 files changed, 901 insertions(+) create mode 100644 .github/workflows/Gmeek.yml create mode 100644 README.md create mode 100644 "backup/\350\257\267\346\216\245\347\235\200\344\271\213\345\220\216\347\232\204\345\256\211\350\243\205\346\255\245\351\252\244\346\211\247\350\241\214.md" create mode 100644 "backup/\350\277\231\346\230\257Gmeek\346\250\241\346\235\277\344\273\223\345\272\223.md" create mode 100644 config.json create mode 100644 docs/index.html create mode 100644 docs/post/qing-jie-zhao-zhi-hou-de-an-zhuang-bu-zou-zhi-xing.html create mode 100644 docs/post/zhe-shi-Gmeek-mo-ban-cang-ku.html create mode 100644 docs/postList.json create mode 100644 docs/rss.xml create mode 100644 docs/tag.html diff --git a/.github/workflows/Gmeek.yml b/.github/workflows/Gmeek.yml new file mode 100644 index 0000000..3644427 --- /dev/null +++ b/.github/workflows/Gmeek.yml @@ -0,0 +1,89 @@ +name: build Gmeek + +on: + workflow_dispatch: + issues: + types: [opened, edited] + schedule: + - cron: "0 16 * * *" + +jobs: + build: + name: Generate blog + runs-on: ubuntu-20.04 + if: ${{ github.event.repository.owner.id == github.event.sender.id || github.event_name == 'schedule' }} + permissions: write-all + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Pages + id: pages + uses: actions/configure-pages@v4 + + - 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@v5 + with: + python-version: 3.8 + + - name: Clone source code + run: | + GMEEK_VERSION=$(jq -r ".GMEEK_VERSION" config.json) + git clone https://github.com/Meekdai/Gmeek.git /opt/Gmeek; + cd /opt/Gmeek/ + lastTag=$(git describe --tags `git rev-list --tags --max-count=1`) + if [ $GMEEK_VERSION == 'last' ]; then git checkout $lastTag; else git checkout $GMEEK_VERSION; fi; + + - name: Install dependencies + run: | + pip install --upgrade pip + pip install -r /opt/Gmeek/requirements.txt + + - name: Generate new html + run: | + cp -r ./* /opt/Gmeek/ + cd /opt/Gmeek/ + python Gmeek.py ${{ secrets.GITHUB_TOKEN }} ${{ github.repository }} --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 "$(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" + sleep 3 + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: 'docs/.' + + deploy: + name: Deploy blog + runs-on: ubuntu-20.04 + needs: build + permissions: + contents: write + pages: write + id-token: write + concurrency: + group: "pages" + cancel-in-progress: false + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/README.md b/README.md new file mode 100644 index 0000000..084eabc --- /dev/null +++ b/README.md @@ -0,0 +1,17 @@ +## 【创建仓库】完成了 +请接着按照下面的步骤2和3进行操作,全部成功之后,本`README.md`文件会自动替换掉的哦! + +### 安装 + +1. 【创建仓库】点击[通过模板创建仓库](https://github.com/new?template_name=Gmeek-template&template_owner=Meekdai),建议仓库名称为`XXX.github.io`,其中`XXX`为你的github用户名。 + +2. 【启用Pages】在本仓库的`Settings`中`Pages->Build and deployment->Source`下面选择`Github Actions`。 + +3. 【开始写作】打开一篇issue,开始写作,并且**必须**添加一个`标签Label`(至少添加一个),再保存issue后会自动创建博客内容,片刻后可通过https://XXX.github.io 访问(可进入Actions页面查看构建进度)。 + +4. 【手动全局生成】这个步骤只有在修改`config.json`文件或者出现奇怪问题的时候,需要执行。 +``` +通过Actions->build Gmeek->Run workflow->里面的按钮全局重新生成一次 +``` + +### Powered by :heart: [Gmeek](https://github.com/Meekdai/Gmeek) diff --git "a/backup/\350\257\267\346\216\245\347\235\200\344\271\213\345\220\216\347\232\204\345\256\211\350\243\205\346\255\245\351\252\244\346\211\247\350\241\214.md" "b/backup/\350\257\267\346\216\245\347\235\200\344\271\213\345\220\216\347\232\204\345\256\211\350\243\205\346\255\245\351\252\244\346\211\247\350\241\214.md" new file mode 100644 index 0000000..0814ad7 --- /dev/null +++ "b/backup/\350\257\267\346\216\245\347\235\200\344\271\213\345\220\216\347\232\204\345\256\211\350\243\205\346\255\245\351\252\244\346\211\247\350\241\214.md" @@ -0,0 +1,5 @@ +如果你点击了`READM.md`的链接后,看到了这个页面,请继续之后的安装步骤执行。 + +成功后`READM.md`会出现你自己的博客地址,并且内容也会更新。 + +[Gmeek快速上手](https://blog.meekdai.com/post/Gmeek-kuai-su-shang-shou.html) \ No newline at end of file diff --git "a/backup/\350\277\231\346\230\257Gmeek\346\250\241\346\235\277\344\273\223\345\272\223.md" "b/backup/\350\277\231\346\230\257Gmeek\346\250\241\346\235\277\344\273\223\345\272\223.md" new file mode 100644 index 0000000..3bd2701 --- /dev/null +++ "b/backup/\350\277\231\346\230\257Gmeek\346\250\241\346\235\277\344\273\223\345\272\223.md" @@ -0,0 +1 @@ +通过这个模板创建库,可以大大减少部署Gmeek博客的配置步骤。 \ No newline at end of file diff --git a/config.json b/config.json new file mode 100644 index 0000000..72642ff --- /dev/null +++ b/config.json @@ -0,0 +1,6 @@ +{ + "title":"Blog Title", + "subTitle":"Blog description", + "avatarUrl":"https://github.githubassets.com/favicons/favicon.svg", + "GMEEK_VERSION":"last" +} diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..630b3c6 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,169 @@ + + + + + + + + + + + +Blog Title + + + + + + + + + +
+
Blog description
+ +
+ + + + + + + diff --git a/docs/post/qing-jie-zhao-zhi-hou-de-an-zhuang-bu-zou-zhi-xing.html b/docs/post/qing-jie-zhao-zhi-hou-de-an-zhuang-bu-zou-zhi-xing.html new file mode 100644 index 0000000..f18ad38 --- /dev/null +++ b/docs/post/qing-jie-zhao-zhi-hou-de-an-zhuang-bu-zou-zhi-xing.html @@ -0,0 +1,172 @@ + + + + + + + + + + + +请接着之后的安装步骤执行 + + + + + + + + + + + + +
+

如果你点击了READM.md的链接后,看到了这个页面,请继续之后的安装步骤执行。

+

成功后READM.md会出现你自己的博客地址,并且内容也会更新。

+

Gmeek快速上手

+
+ +
+
+ + + + + + + + + + diff --git a/docs/post/zhe-shi-Gmeek-mo-ban-cang-ku.html b/docs/post/zhe-shi-Gmeek-mo-ban-cang-ku.html new file mode 100644 index 0000000..cd9bf0f --- /dev/null +++ b/docs/post/zhe-shi-Gmeek-mo-ban-cang-ku.html @@ -0,0 +1,170 @@ + + + + + + + + + + + +这是Gmeek模板仓库 + + + + + + + + + + + + +
+

通过这个模板创建库,可以大大减少部署Gmeek博客的配置步骤。

+
+ +
+
+ + + + + + + + + + diff --git a/docs/postList.json b/docs/postList.json new file mode 100644 index 0000000..e3b94f0 --- /dev/null +++ b/docs/postList.json @@ -0,0 +1 @@ +{"P2": {"label": "documentation", "labelColor": "#0075ca", "postTitle": "\u8bf7\u63a5\u7740\u4e4b\u540e\u7684\u5b89\u88c5\u6b65\u9aa4\u6267\u884c", "postUrl": "post/qing-jie-zhao-zhi-hou-de-an-zhuang-bu-zou-zhi-xing.html", "createdDate": "2024-03-14", "dateLabelColor": "#bc4c00"}, "P1": {"label": "good first issue", "labelColor": "#7057ff", "postTitle": "\u8fd9\u662fGmeek\u6a21\u677f\u4ed3\u5e93", "postUrl": "post/zhe-shi-Gmeek-mo-ban-cang-ku.html", "createdDate": "2023-12-20", "dateLabelColor": "#A333D0"}} \ No newline at end of file diff --git a/docs/rss.xml b/docs/rss.xml new file mode 100644 index 0000000..fa54257 --- /dev/null +++ b/docs/rss.xml @@ -0,0 +1,2 @@ + +Blog Titlehttps://Meekdai.github.io/Gmeek-templateBlog descriptionBlog Titlehttp://www.rssboard.org/rss-specificationpython-feedgenhttps://github.githubassets.com/favicons/favicon.svgavatarhttps://Meekdai.github.io/Gmeek-templateThu, 14 Mar 2024 09:17:29 +0000Blog Title60Blog Title请接着之后的安装步骤执行https://Meekdai.github.io/Gmeek-template/post/qing-jie-zhao-zhi-hou-de-an-zhuang-bu-zou-zhi-xing.html如果你点击了`READM.md`的链接后,看到了这个页面,请继续之后的安装步骤执行。https://Meekdai.github.io/Gmeek-template/post/qing-jie-zhao-zhi-hou-de-an-zhuang-bu-zou-zhi-xing.htmlThu, 14 Mar 2024 09:15:10 +0000这是Gmeek模板仓库https://Meekdai.github.io/Gmeek-template/post/zhe-shi-Gmeek-mo-ban-cang-ku.html通过这个模板创建库,可以大大减少部署Gmeek博客的配置步骤。https://Meekdai.github.io/Gmeek-template/post/zhe-shi-Gmeek-mo-ban-cang-ku.htmlWed, 20 Dec 2023 07:42:24 +0000 \ No newline at end of file diff --git a/docs/tag.html b/docs/tag.html new file mode 100644 index 0000000..b75ff20 --- /dev/null +++ b/docs/tag.html @@ -0,0 +1,269 @@ + + + + + + + + + + + +Blog Title - Tag + + + + + + + + + +
+
+ + +
+ + + + + + +