Skip to content

Commit

Permalink
Changed the order in which the server is toggled off and then on
Browse files Browse the repository at this point in the history
The crontab command that's running could easily restart the server while it's updating things, so there's not much point in trying to ensure it's completely offline, and the dependency download and migrations should generally not require it to be down (since most everything that matters will just be in memory). Instead, we'll simply toggle the server after all upgrade tasks are complete.
  • Loading branch information
onecrayon committed Jan 21, 2024
1 parent c6e9de5 commit 3e6b598
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,14 @@ jobs:
SSH_USER: ${{ secrets.SSH_USER }}
SSH_KEY: ${{ secrets.SSH_KEY }}
SSH_HOST: ${{ secrets.SSH_HOST }}
- name: Stop the server
run: ssh deploy-server "cd \"$SCRIPT_PATH\" && ./stop"
- name: Check out source
run: ssh deploy-server "cd \"${SCRIPT_PATH}/${REPO_NAME}\" && git fetch && git reset --hard origin/main"
env:
REPO_NAME: ${{ github.event.repository.name }}
- name: Update dependencies & run migrations
run: ssh deploy-server "cd \"$SCRIPT_PATH\" && ./update"
- name: Stop the server
run: ssh deploy-server "cd \"$SCRIPT_PATH\" && ./stop"
- name: Start the server
if: ${{ always() }}
run: ssh deploy-server "cd \"$SCRIPT_PATH\" && ./start"

0 comments on commit 3e6b598

Please sign in to comment.