Skip to content

Commit

Permalink
Merge pull request #31 from t1nyb0x/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
t1nyb0x authored Nov 14, 2024
2 parents 1a8fb07 + 62bf13c commit 4f239cb
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,11 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Setup SSH
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
SSH_KNOWN_HOSTS: ${{ secrets.SSH_KNOWN_HOSTS }}
run: |
mkdir -p ~/.ssh/
echo "$SSH_PRIVATE_KEY" > ~/.ssh/deploy_key
chmod 600 ~/.ssh/deploy_key
echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
- name: Install SSH key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
known_hosts: ${{ secrets.SSH_KNOWN_HOSTS }}

- name: Restart Application
env:
Expand All @@ -31,7 +27,7 @@ jobs:
ENV: ${{ secrets.ENVIRONMENT }}
TOKEN: ${{ secrets.PRODUCTION_TOKEN }}
run: |
ssh -o StrictHostKeyChecking=no -i ~/.ssh/deploy_key $SSH_USER@$VPS_HOST -p $SSH_PORT \
'export ENVIRONMENT=$ENV && export PRODUCTION_TOKEN=$TOKEN \
ssh $SSH_USER@$VPS_HOST -p $SSH_PORT \
'export ENVIRONMENT=$ENV && export PRODUCTION_TOKEN=$TOKEN && \
docker pull ghcr.io/t1nyb0x/discord-twitter-embed-rx:latest && \
docker run --env ENVIRONMENT --env PRODUCTION_TOKEN ghcr.io/t1nyb0x/discord-twitter-embed-rx:latest'

0 comments on commit 4f239cb

Please sign in to comment.