Skip to content

Commit

Permalink
fix server yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
Doris-Siu committed Mar 3, 2024
1 parent 7e633cc commit 6b45626
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/backend-ec2-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
uses: actions/checkout@v3
- name: Add SSH key to agent
run: |
echo "${{ secrets.SSH_PRIVATE_KEY }}" | tr -d '\r' | ssh-keygen -i /dev/stdin -f id_rsa
chmod 600 id_rsa
ssh-add id_rsa
echo "${{ secrets.SSH_PRIVATE_KEY }}" | tr -d '\r' > id_rsa_tmp
chmod 600 id_rsa_tmp
ssh-keygen -i id_rsa_tmp -f id_rsa
rm id_rsa_tmp
- name: SSH into EC2 instance and deploy
run: |
ssh -i id_rsa ubuntu@${{ secrets.EC2_DNS }} "bash -c 'cd /server.js && git pull && npm install && pm2 start server.js'"
Expand Down
2 changes: 1 addition & 1 deletion server/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ const db = new Pool({
// },
// ];
// GET "/"
//test5
//test6
app.get("/", (req, res) => {

db.query("SELECT * FROM videos", (error, result) => {
Expand Down

0 comments on commit 6b45626

Please sign in to comment.