Update Home.tsx #60
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy to EC2 | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Setup SSH Agent | |
uses: webfactory/ssh-agent@v0.5.2 | |
with: | |
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | |
- name: Copy repository to EC2 | |
uses: appleboy/scp-action@master | |
with: | |
host: ${{ secrets.EC2_HOST }} | |
username: ${{ secrets.EC2_USERNAME }} | |
key: ${{ secrets.SSH_PRIVATE_KEY }} | |
passphrase: ${{ secrets.SSH_PASSPHRASE }} | |
port: ${{ secrets.SSH_PORT }} | |
source: "." | |
target: "KaniCasino/backend/" | |
- name: Run deployment script | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.EC2_HOST }} | |
username: ${{ secrets.EC2_USERNAME }} | |
key: ${{ secrets.SSH_PRIVATE_KEY }} | |
passphrase: ${{ secrets.SSH_PASSPHRASE }} | |
port: ${{ secrets.SSH_PORT }} | |
script: | | |
cd KaniCasino/backend/ | |
npm install | |
nohup node index.js & |