Skip to content

Commit 54ce436

Browse files
committed
CI/CD重启服务时清空Redis缓存
1 parent d557d62 commit 54ce436

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

.github/workflows/auto-deploy.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ jobs:
8080
script: |
8181
cd /root/project/forum
8282
jps -l | grep -E -i 'forum' | awk '{print "kill "$1}' | sh
83+
docker exec redis redis-cli -a ${ secrets.REDIS_PASSWORD } FLUSHDB
8384
rm -rf logs
8485
nohup java -jar forum-${{ env.VERSION }}.jar --spring.profiles.active=dev >/dev/null 2>&1 &
8586
echo 'forum-${{ env.VERSION }} service started successfully.'

0 commit comments

Comments
 (0)