Skip to content

Commit 445ed40

Browse files
committed
Update RSS and Sitemap workflows
1 parent a8673c4 commit 445ed40

File tree

6 files changed

+31
-22
lines changed

6 files changed

+31
-22
lines changed

Diff for: .github/workflows/rss.yml

+8-10
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,26 @@
11
name: RSS
22

3-
#on: [ push, pull_request ]
4-
on: [ pull_request, workflow_dispatch ]
3+
on:
4+
push:
5+
branches:
6+
- master
7+
workflow_dispatch:
58

69
jobs:
710
build:
811
runs-on: ubuntu-latest
912

1013
steps:
11-
- name: Checkout
12-
uses: actions/checkout@v2
13-
with:
14-
fetch-depth: 0
15-
ref: ${{ github.head_ref }}
14+
- uses: actions/checkout@v4
1615

1716
- name: Install Pandoc
1817
run:
1918
sudo apt-get install -y pandoc
2019

2120
- name: Build RSS
22-
run: |
23-
git pull --rebase
24-
cd docs/
21+
run:
2522
./rss.sh
23+
working-directory: docs/
2624

2725
- name: Commit Updated
2826
uses: stefanzweifel/git-auto-commit-action@v4

Diff for: .github/workflows/sitemap.yml

+8-10
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,22 @@
11
name: Sitemap
22

3-
#on: [ push, pull_request ]
4-
on: [ pull_request, workflow_dispatch ]
3+
on:
4+
push:
5+
branches:
6+
- master
7+
workflow_dispatch:
58

69
jobs:
710
build:
811
runs-on: ubuntu-latest
912

1013
steps:
11-
- name: Checkout
12-
uses: actions/checkout@v2
13-
with:
14-
fetch-depth: 0
15-
ref: ${{ github.head_ref }}
14+
- uses: actions/checkout@v4
1615

1716
- name: Build Sitemap
18-
run: |
19-
git pull --rebase
20-
cd docs/
17+
run:
2118
./sitemap.sh
19+
working-directory: docs/
2220

2321
- name: Commit Updated
2422
uses: stefanzweifel/git-auto-commit-action@v4

Diff for: docs/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# 关于我
1+
# 关于我 :id=about
22

33
[![博客](https://img.shields.io/badge/Blog-qq52o.me-blue)](https://qq52o.me "沈唁志")
44
[![知乎](https://cdn.jsdelivr.net/gh/sy-records/staticfile/images/ico/zhihu.svg)](https://www.zhihu.com/people/sy-records "沈唁")

Diff for: docs/_coverpage.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
## 🍃Don't let your past determine the future. :id=cover-page-hitokoto
66

77
[GitHub](https://github.com/sy-records)
8-
[Getting Started](#main)
8+
[Getting Started](#about)
99

1010
![](https://cdn.jsdelivr.net/gh/sy-records/staticfile/images/202109/home-background.jpg)

Diff for: docs/rss.sh

+6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ feed="feed.xml"
44
website_title="沈唁的编程笔记"
55
website_link="https://notes.qq52o.me"
66
description="沈唁的编程笔记"
7+
followFeedId=110879509092022272
8+
followUserId=72226467595413504
79

810
urlencode() {
911
local length="${#1}"
@@ -49,6 +51,10 @@ rss_content="<rss xmlns:atom=\"http://www.w3.org/2005/Atom\" version=\"2.0\">
4951
<atom:link href=\"$website_link/$feed\" rel=\"self\" type=\"application/rss+xml\" />
5052
<link>$website_link</link>
5153
<description>$description</description>
54+
<follow_challenge>
55+
<feedId>$followFeedId</feedId>
56+
<userId>$followUserId</userId>
57+
</follow_challenge>
5258
$items
5359
</channel>
5460
</rss>"

Diff for: docs/tools/git.md

+7
Original file line numberDiff line numberDiff line change
@@ -283,3 +283,10 @@ git push origin :refs/tags/<tagname>
283283
```bash
284284
git checkout branchName -- filepath
285285
```
286+
287+
## 生成patch并合并
288+
289+
```bash
290+
git format-patch -1 commitId -o ~/GitHub/sy-records/path
291+
git apply --reject patchfile
292+
```

0 commit comments

Comments
 (0)