Skip to content

added test code to next #1

added test code to next

added test code to next #1

name: Deploy Next App
on:
push:
paths:
- 'apps/next-app/**'
- 'packages/ui/**'
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: SSH into the machine to deploy
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
run: |
echo "$SSH_PRIVATE_KEY" > keyfile
chmod 600 keyfile
mkdir -p ~/.ssh
cp known_hosts ~/.ssh/known_hosts
ssh -t -i keyfile ubuntu@ec2-18-206-57-36.compute-1.amazonaws.com "sudo bash /home/ubuntu/my-turborepo/apps/next-app/deploy.sh"