From 755addd9167afe8c014c8e5e385d967ac045b0be Mon Sep 17 00:00:00 2001 From: NianBroken Date: Wed, 31 Jan 2024 15:46:51 +0800 Subject: [PATCH] Added the ability to calculate GPA, and optimized the relevant code to determine whether to run for the first time. --- .github/workflows/main.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e1a111e..e0289eb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -48,8 +48,11 @@ jobs: - name: Restore local .txt files and delete backup # 从备份目录将.txt文件还原到当前目录,然后删除备份目录 run: | - cp backup/*.txt . + if [ -e backup/*.txt ]; then + cp backup/*.txt . + fi rm -rf backup + shell: /usr/bin/bash -e {0} - name: Run main.py # 运行主程序main.py run: python main.py