feat : wrapping up with unsubscribe and at localstorage #20
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 | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v2 | |
- name: SSH and deploy | |
env: | |
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} | |
run: | | |
echo "Deploying to production" | |
echo "$SSH_PRIVATE_KEY" > keyfile | |
chmod 600 keyfile | |
mkdir -p ~/.ssh | |
cp known_hosts ~/.ssh/known_hosts | |
ssh -i keyfile ubuntu@${{ secrets.INSTANCE_IP }} "sudo bash ~/deploy.sh" |