Skip to content

Commit

Permalink
testaction@7
Browse files Browse the repository at this point in the history
  • Loading branch information
yaoqs committed Feb 4, 2024
1 parent 439698c commit a3ed7c6
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/GenerateBlog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [issues,push]

jobs:
build:
runs-on: ubuntu-latest
runs-on: windows-latest #ubuntu-latest
permissions: # Job-level permissions configuration starts here
contents: write # 'write' access to repository contents
pull-requests: write # 'write' access to pull requests
Expand Down Expand Up @@ -33,6 +33,6 @@ jobs:
git config user.email github-actions@github.com
git checkout main
git pull --ff
git add _posts/*
git add .
git commit -m "feat: github action generate blog"
git push
4 changes: 2 additions & 2 deletions GenerateBlog.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ return { fileName, content };

async function writeArticleToFile(article) {
return new Promise((resolve, reject) => {
var projectPath="_posts";
var projectPath="docs";
// 使用fs.existsSync()方法检查文件夹是否存在
if (!fs.existsSync(projectPath)) {
console.log(`Folder '${projectPath}' does not exist. Creating...`);
Expand Down Expand Up @@ -150,7 +150,7 @@ var main = async (user, repo, labels) => {
resolve(data);
});
readme=readme+'\n'+ref;
var ref=fs.writeFileSync('README.md',readme,function (err) {
var ref=fs.writeFileSync('docs/README.md',readme,function (err) {
if (err) {
console.log(err);
reject(err);
Expand Down
17 changes: 17 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Issues-LordYao

## ToC

- [创刊-20240131](https://github.com/repos/yaoqs/Issues-LordYao/_posts/创刊-20240131.md) [查看原文](https://github.com/yaoqs/Issues-LordYao/issues/1)

## References

- [使用github强大的issues功能来写博客](https://github.com/zp1112/blog/issues/3)
- [使用github issue创建blog](https://github.com/lotosbin/lotosbin.github.io/issues/10)
- **[issue2blog](https://github.com/lotosbin/issue2blog/tree/master)**
- [两款基于 GitHub issues 的博客工具](https://www.v2ex.com/t/253854)
- [基于Github Issues的博客搭建](https://github.com/superleeyom/blog/issues/38)
- [Leeyom's Blog](https://blog.leeyom.top/)
- [main.py](https://github.com/superleeyom/blog/blob/main/main.py)
- [.github/workflows/generate_readme.yml](https://github.com/superleeyom/blog/blob/main/.github/workflows/generate_readme.yml)
- [github-push-action/action.yml](https://github.com/ad-m/github-push-action/blob/master/action.yml)
File renamed without changes.

0 comments on commit a3ed7c6

Please sign in to comment.