Skip to content

Commit

Permalink
Remove old deploy CI
Browse files Browse the repository at this point in the history
  • Loading branch information
benthecarman committed Sep 28, 2023
1 parent 806894e commit 82e669a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 43 deletions.
41 changes: 0 additions & 41 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,44 +53,3 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

deploy:
name: Deploy to Linode
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout master
uses: actions/checkout@v1
- name: Add environment variables to .env
run: |
echo "IMAGE=${{ env.IMAGE }}" >> .env
echo "LINODE_USER=${{ secrets.LINODE_USER }}" >> .env
echo "NAMESPACE=${{ secrets.NAMESPACE }}" >> .env
echo "PERSONAL_ACCESS_TOKEN=${{ secrets.PERSONAL_ACCESS_TOKEN }}" >> .env
- name: Add the private SSH key to the ssh-agent
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
run: |
mkdir -p ~/.ssh
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
ssh-keyscan github.com >> ~/.ssh/known_hosts
ssh-add - <<< "${{ secrets.PRIVATE_KEY }}"
- name: Build and deploy images on Linode
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
run: |
scp -o StrictHostKeyChecking=no -r ./.env ${{ secrets.LINODE_USER }}@${{ secrets.LINODE_IP_ADDRESS }}:/home/${{ secrets.LINODE_USER }}/app
ssh -o StrictHostKeyChecking=no ${{ secrets.LINODE_USER }}@${{ secrets.LINODE_IP_ADDRESS }} "\
export LINODE_USER=$LINODE_USER; \
export IMAGE=$IMAGE; \
export NAMESPACE=$NAMESPACE; \
export PERSONAL_ACCESS_TOKEN=$PERSONAL_ACCESS_TOKEN; \
bash -s" << 'ENDSSH'
cd /home/proxyuser/app
source .env
docker login ghcr.io -u $NAMESPACE -p $PERSONAL_ACCESS_TOKEN
docker pull $IMAGE
docker stop ln-websocket-proxy
docker rm ln-websocket-proxy
docker run --restart unless-stopped -d --name ln-websocket-proxy -p 8080:8080 $IMAGE
ENDSSH
5 changes: 3 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 82e669a

Please sign in to comment.