Skip to content

Commit

Permalink
Merge pull request #29 from SimerusM/deploy_action
Browse files Browse the repository at this point in the history
Deploy action
  • Loading branch information
16BitNarwhal authored Sep 3, 2024
2 parents 4a9f104 + adce8cd commit 3edca58
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
35 changes: 35 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Deploy

on:
push:
branches:
- main
workflow_dispatch:

jobs:
deploy:
name: "Deploy"
runs-on: ubuntu-latest
steps:
- name: Configure SSH
run: |
mkdir -p ~/.ssh/
echo "$SSH_PRIVATE_KEY" > ~/.ssh/deploy-key.pem
chmod 600 ~/.ssh/deploy-key.pem
cat >> ~/.ssh/config <<END
Host my-vps
HostName $SSH_IP
User $SSH_USER
IdentityFile ~/.ssh/deploy-key.pem
StrictHostKeyChecking no
END
env:
SSH_USER: ${{ secrets.SSH_USER }}
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
SSH_IP: ${{ secrets.SSH_IP }}

- name: Run deployment script on project root directory
run: ssh my-vps 'cd ${{ secrets.PROJECT_ROOT }} && git fetch && git pull && ./prod.sh'

- name: Discord notification
run: curl -s -X POST "${{ secrets.DISCORD_WEBHOOK }}" -d "content=🚀 Deployment Successful"
2 changes: 1 addition & 1 deletion client/src/pages/MeetingPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const MeetingPage = () => {
}

console.log(`Joining meeting with ID: ${meeting_id}`);
toast.success(`Joining the meeting`);
toast.success(`Joining the meeting...`);

const newSocket = io(apiUrl);
socketRef.current = newSocket;
Expand Down

0 comments on commit 3edca58

Please sign in to comment.