Skip to content

Commit 1d42981

Browse files
committed
update curl put to publish
1 parent a1aff38 commit 1d42981

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.github/workflows/generate_release_pdf.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
env:
1313
TYPST_FILE_NAME: cppguidebook
1414
TYPST_FONT_PATH: fonts
15-
MIRROR_SITE_URL: https://142857.red
15+
MIRROR_SITE_URL: https://142857.red/files
1616
MIRROR_SITE_TOKEN: ${{ env.SEVEN_TOKEN }}
1717

1818
jobs:
@@ -39,7 +39,7 @@ jobs:
3939
else
4040
# Download font metadata
4141
mkdir -p cv
42-
curl -s "https://fonts.google.com/download/list?family=Noto%20Sans%20SC" > cv/noto_sans_sc_raw.txt
42+
curl -sL "https://fonts.google.com/download/list?family=Noto%20Sans%20SC" > cv/noto_sans_sc_raw.txt
4343
4444
# Remove ")]}'" from the beginning of the file
4545
tail -c +5 cv/noto_sans_sc_raw.txt > cv/noto_sans_sc_metadata.json
@@ -73,7 +73,7 @@ jobs:
7373
- name: Publish to mirror site
7474
continue-on-error: true
7575
run: |
76-
curl -X PUT -L ${{ env.MIRROR_SITE_URL }}/${{ env.TYPST_FILE_NAME }}.pdf -d @file=${{ env.TYPST_FILE_NAME }}.pdf -d token=${{ env.MIRROR_SITE_TOKEN }}
76+
curl -L -X PUT ${{ env.MIRROR_SITE_URL }}/${{ env.TYPST_FILE_NAME }}.pdf -F file=@${{ env.TYPST_FILE_NAME }}.pdf -F token=${{ env.MIRROR_SITE_TOKEN }}
7777
7878
- name: Delete old Release
7979
uses: actions/github-script@v5

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
可以前往 [Release 页面](https://github.com/parallel101/cppguidebook/releases) 免费下载本书的完整 PDF 文件。
1111

12-
Release 页面太慢?GitHub 卡顿,无法下载?访问 [小彭老师自己维护的镜像](https://142857.red/cppguidebook.pdf)
12+
Release 页面太慢?GitHub 卡顿,无法下载?访问 [小彭老师自己维护的镜像](https://142857.red/files/cppguidebook.pdf)
1313

1414
> [!NOTE]
1515
> 感谢 [Derived Cat](https://github.com/hooyuser) 大佬提供智能脚本!每当小彭老师推送了修改后,该 PDF 文件都会自动更新。只要看到小彭老师提交新 commit,你就可以随时重新下载最新版。

0 commit comments

Comments
 (0)