-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4d6d66e
commit de27a1f
Showing
4 changed files
with
25 additions
and
24 deletions.
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 |
---|---|---|
@@ -1,21 +1,21 @@ | ||
name: Deploy | ||
|
||
name: Build & Deploy | ||
on: | ||
push: | ||
branches: [ main ] # or 'master' if that's your main branch | ||
branches: [main] | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Deploy to Server | ||
uses: appleboy/ssh-action@v1.0.0 | ||
- name: Deploy NodeJS app | ||
uses: appleboy/ssh-action@v0.1.2 | ||
with: | ||
host: ${{ secrets.HOST }} | ||
username: root | ||
key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
host: ${{secrets.SSH_HOST}} # IP address of the server you wish to ssh into | ||
key: ${{secrets.SSH_KEY}} # Private or public key of the server | ||
username: ${{ secrets.SSH_USERNAME }} # User of the server you want to ssh into | ||
|
||
script: | | ||
cd /var/www/valkyrie | ||
git pull | ||
npm install | ||
pm2 reload all || pm2 start server/server.js --name "valkyrie" | ||
mkdir test | ||
cd test | ||
git clone [email protected]:Mulubwa17/ci-cd-to-digitalocean-with-github-actions.git | ||
echo 'Deployment successful to digital ocean' |
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 @@ | ||
web: node server/server.js |
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