Skip to content

Commit

Permalink
fix: optimize deploy code
Browse files Browse the repository at this point in the history
  • Loading branch information
fanzhidongyzby committed Jan 23, 2025
1 parent 9ccd267 commit a38e3aa
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/deploy-pre.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,14 @@ jobs:
source /root/miniconda3/etc/profile.d/conda.sh
conda activate osgraph-env
cd $DEPLOY_PATH
echo "Update master branch"
git checkout master
git pull
git pull origin master
echo "Build OSGraph"
bash ./bin/build.sh
echo "Start OSGraph"
bash ./bin/start.sh prod
EOF
10 changes: 8 additions & 2 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,14 @@ jobs:
source /root/miniconda3/etc/profile.d/conda.sh
conda activate osgraph-env
cd $DEPLOY_PATH
git checkout $DEPLOY_BRANCH
git pull
echo "Switch to branch $DEPLOY_BRANCH"
git show-ref --verify --quiet refs/heads/deploy && git branch -D deploy
git checkout -b deploy $DEPLOY_BRANCH
echo "Build OSGraph"
bash ./bin/build.sh
echo "Start OSGraph"
bash ./bin/start.sh prod
EOF

0 comments on commit a38e3aa

Please sign in to comment.