Skip to content

Commit

Permalink
ci: just get something to work
Browse files Browse the repository at this point in the history
  • Loading branch information
onlycs committed Aug 24, 2023
1 parent 85b64a1 commit d832cb3
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ jobs:
- name: Copy DotEnv to root
run: echo "${{ secrets.DOTENV }}" > .env

- name: Aliasing
run: |
alias on-server="ssh -i ssh_key ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} -p ${{ secrets.SSH_PORT }} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=ERROR "
- name: Setup Rust Cache
uses: Swatinem/rust-cache@v2

Expand Down Expand Up @@ -52,13 +48,13 @@ jobs:
echo "${{ secrets.SSH_KEY }}" > ssh_key
chmod 600 ssh_key
- name: Kill and stop docker container
continue-on-error: true
run: |
on-server docker kill oreobot 2> /dev/null
on-server docker rm oreobot 2> /dev/null
# - name: Kill and stop docker container
# continue-on-error: true
# run: |
# ssh -i ssh_key ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} -p ${{ secrets.SSH_PORT }} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=ERROR docker kill oreobot 2> /dev/null
# ssh -i ssh_key ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} -p ${{ secrets.SSH_PORT }} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=ERROR docker rm oreobot 2> /dev/null

- name: Pull and run docker container
run: |
on-server docker pull ${{ secrets.DOCKER_USERNAME }}/oreobot:latest
on-server docker run -d --name oreobot ${{ secrets.DOCKER_USERNAME }}/oreobot:latest
# - name: Pull and run docker container
# run: |
# ssh -i ssh_key ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} -p ${{ secrets.SSH_PORT }} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=ERROR docker pull ${{ secrets.DOCKER_USERNAME }}/oreobot:latest
# ssh -i ssh_key ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} -p ${{ secrets.SSH_PORT }} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=ERROR docker run -d --name oreobot ${{ secrets.DOCKER_USERNAME }}/oreobot:latest

0 comments on commit d832cb3

Please sign in to comment.