Skip to content

Commit

Permalink
Merge pull request #11 from aldras/main
Browse files Browse the repository at this point in the history
Chore: Update deployment file, add git reset
  • Loading branch information
aldras authored Apr 8, 2023
2 parents e4e5b89 + 339857d commit 031bfb4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
echo "${{ secrets.DEPLOY_SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
ssh-keyscan -H ${{ secrets.DEPLOY_SSH_HOST }} > ~/.ssh/known_hosts
- name: connect and pull
run: ssh ${{ secrets.DEPLOY_SSH_USER }}@${{ secrets.DEPLOY_SSH_HOST }} "cd ${{ secrets.DEPLOY_WORK_DIR }} && git checkout ${{ secrets.DEPLOY_MAIN_BRANCH }} && git pull && exit"
run: ssh ${{ secrets.DEPLOY_SSH_USER }}@${{ secrets.DEPLOY_SSH_HOST }} "cd ${{ secrets.DEPLOY_WORK_DIR }} && git reset --hard && git checkout ${{ secrets.DEPLOY_MAIN_BRANCH }} && git pull && exit"
- name: execute post tasks
run: ssh ${{ secrets.DEPLOY_SSH_USER }}@${{ secrets.DEPLOY_SSH_HOST }} "cd ${{ secrets.DEPLOY_WORK_DIR }} && cd ../. && ./deploy_post.sh && exit"
- name: cleanup
Expand Down

0 comments on commit 031bfb4

Please sign in to comment.