-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ad ci/cd workflow for deployment and update readme with ec2 url
- Loading branch information
Showing
3 changed files
with
37 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Deploy | ||
|
||
on: | ||
push: | ||
branches: | ||
- master # or the branch you want to deploy from | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install pm2 | ||
run: npm install -g pm2 | ||
|
||
- name: SSH and deploy | ||
env: | ||
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} | ||
shell: bash | ||
run: | | ||
echo "$SSH_PRIVATE_KEY" > keyfile | ||
echo "$HOME/.local/bin" >> $GITHUB_PATH | ||
chmod 600 keyfile | ||
mkdir -p ~/.ssh | ||
cp known_hosts ~/.ssh/known_hosts | ||
ssh -t -i keyfile [email protected] "sudo bash ~/deploy.sh" | ||
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
|1|5C1SxxZgY1qT8jmJ7V2v1MDtySI=|P0IvNTO0A0475T78yC5gfwdk2G4= ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBAQlrQrtEk4sxG/YyR8Np/cldjdmTL6kUadk53nXuRsF+iSFetmXpIWnU9hHVCS4H8wfno2FdSe8wTCvyFkPw6k= | ||
|1|TBiWs41KIe1Nk9tF0Xqv0HWEPXg=|/xxzN6YRU38nmuZyeTdM0R/c5ao= ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCvgnHL1fwnknNUf7QlIdym91KrTYluToEIkfsDsA+qCvxm0fV+r311dYrTaoGMsuL83f3DFsTo8fHTWpNDdWqbDBPpAfDyaopuNQfDvXdYYyHqQ6+16RGzi3nmD1bFIPDW/E1ZH35/8VCy5L+mWinCa5akffBi/RIVPS6tayayVBWmh/ztjG5gfxecvUMjL2VOL4YJLlnrT+jQ4XG7zMQc+WXW5e4T7BrnxB1lCLgVl0kEfib0DjHQZE0QnqXKkN8Tv3qPHQXbMqNosoOulxC5Jyhv5v+pwbm16BhkOb6sXhcQqb4JIClEqVXJmpE4ASzwCS1/BEBUYK/3ElsP988fONIu771FBu87dWdUIH7Ph3Mr0x0t44UH/Yp98SpTGyEy+UghnXhVcpm06t6a6uRgVmVL3PdsA7cHhT15JJyKB/tkJ/O8xrdQFF+TIvIFvjwRSHstPx+JtjDBZ08ZgiaZTjlwx5nctj19ygutiHwCI8XFEn/WlxglXcyriKYapNU= | ||
|1|unUaMS+ms8JtYCbgNDfZWBMsIfk=|jhtSyCh8U4p4hvWNm4aZ4TGkAHo= ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHw8NvHhZqMbyOnlqUqkD4isMrR1GChHirWs0KWKYopH |