Update main.yml

This commit is contained in:
碎念_Nian
2024-02-02 21:26:07 +08:00
committed by GitHub
Unverified
parent 72bde4b6a1
commit 5ec60ebd71
+2 -2
View File
@@ -36,7 +36,7 @@ jobs:
- name: Backup local .txt files - name: Backup local .txt files
run: | run: |
mkdir backup mkdir backup
if [ -e *.txt ]; then if ls *.txt &> /dev/null; then
cp *.txt backup/ cp *.txt backup/
else else
echo "No .txt files to backup" echo "No .txt files to backup"
@@ -51,7 +51,7 @@ jobs:
# Restore local .txt files and delete backup # Restore local .txt files and delete backup
- name: Restore local .txt files and delete backup - name: Restore local .txt files and delete backup
run: | run: |
if [ -e backup/*.txt ]; then if ls backup/*.txt &> /dev/null; then
cp backup/*.txt . cp backup/*.txt .
rm -rf backup rm -rf backup
else else