Skip to content

Commit

Permalink
fix: include cd in github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ParthGupta2510 committed Sep 2, 2023
1 parent 17ac34e commit a13ead9
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
20 changes: 20 additions & 0 deletions .github/workflows/react-build-export.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,23 @@ jobs:
PROJECT_DIR: .
BUILD_BRANCH: build
TOKEN: ${{ secrets.ACTIONS_TOKEN }}


deploy:
needs: build-and-export
runs-on: ubuntu-latest
steps:
- name: Set up SSH key
run: |
mkdir -p ~/.ssh/
echo "$SERVER_SSH_KEY" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan github.com >> ~/.ssh/known_hosts
env:
SERVER_SSH_KEY: ${{ secrets.SERVER_SSH_KEY }}

- name: SSH into remote server
run: |
ssh -i ${{ secrets.SERVER_SSH_KEY }} ubuntu@ec2-65-1-222-220.ap-south-1.compute.amazonaws.com 'cd ./tsg-backend/ && ./.git/hooks/post-receive'
env:
SERVER_SSH_KEY: ${{ secrets.SERVER_SSH_KEY }}
2 changes: 1 addition & 1 deletion src/data/secyData.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ export const secyData = {
"RollNo": "22CH10003",
"Name": "Aditya Deep",
"Post": "Secretary Web",
"img": "22CH10003.png",
"img": "22CH10003.jpg",
"Email": "adityadeep3007@gmail.com",
"Contact": 8603847976,
"Insti Email": "adityadeep@kgpian.iitkgp.ac.in",
Expand Down

0 comments on commit a13ead9

Please sign in to comment.