File tree 3 files changed +16
-11
lines changed
3 files changed +16
-11
lines changed Original file line number Diff line number Diff line change 47
47
48
48
# Runs a single command using the runners shell
49
49
- name : Run a one-line script
50
- run : ./Script/ci_run.sh
51
- shell : bash
52
-
53
- # - name: Push Repo
54
- # uses: actions-js/push@master
55
- # with:
56
- # github_token: ${{ secrets.ACCESS_TOKEN }}
57
-
50
+ run : ./Script/ci_run.sh ${{ github.event.inputs.weekly_index }}
51
+ shell : bash
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
- path=$( cd $( dirname $0 ) ; pwd)
3
+ path=$( cd $( dirname " $0 " ) ; pwd)
4
4
deploy=" ${path} /deploy.py"
5
- python3 ${deploy}
5
+
6
+ if [ -n " $1 " ]; then
7
+ python3 " ${deploy} " --index " $1 "
8
+ else
9
+ python3 " ${deploy} "
10
+ fi
Original file line number Diff line number Diff line change @@ -34,6 +34,12 @@ def get_blog_head_contents(self, title):
34
34
date = time .strftime ("%Y-%m-%d %H:%M:%S" , time .localtime ())
35
35
today = f"date: { date } "
36
36
37
+ date_path_format = time .strftime ("%Y/%m/%d" , time .localtime ())
38
+ file_name_format = os .path .splitext (self .file_name )[0 ]
39
+ # for real address
40
+ blog_url = f"https://zhangferry.com/{ date_path_format } /{ file_name_format } "
41
+ print (f"Blog url: { blog_url } " )
42
+
37
43
cover = "cover: https://cdn.zhangferry.com/Images/moyu_weekly_cover.jpeg"
38
44
tags = "tags:\n \t - iOS摸鱼周报"
39
45
comments = "comments: true"
@@ -145,4 +151,4 @@ def run_with(self, blog_repo):
145
151
blog_repo = BlogRepo (token = blog_token , git_url = blog_git_url , branch = blog_branch )
146
152
builder .run_with (blog_repo = blog_repo )
147
153
148
- print ("push weekly article success! 🚀" )
154
+ print ("Deploy weekly article success! It will take effect in about 10 minutes 🚀" )
You can’t perform that action at this time.
0 commit comments